-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
88 lines (86 loc) · 2.65 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
version: '3.8'
services:
postgres:
image: postgres:16-alpine
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
ports:
- "5432:5432"
volumes:
- postgres_lor:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 5s
timeout: 5s
retries: 10
minio:
image: minio/minio:RELEASE.2024-01-31T20-20-33Z
ports:
- "9000:9000"
- "9090:9090"
volumes:
- minio_lor:/data
environment:
MINIO_ROOT_USER: ${MINIO_ROOT_USER}
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD}
command: server --console-address ":9090" /data
createbuckets:
image: minio/mc
depends_on:
- minio
entrypoint:
- /bin/sh
- -c
- |
mc alias set minio http://minio:9000 ${MINIO_ROOT_USER} ${MINIO_ROOT_PASSWORD};
mc mb minio/replays;
mc mb minio/pictures;
mc mb minio/original;
mc anonymous set download minio/replays;
mc anonymous set download minio/pictures;
mc admin user add minio ${S3_ACCESS_KEY} ${S3_SECRET_KEY};
mc admin policy attach minio readwrite --user ${S3_ACCESS_KEY};
exit 0;
app:
# If you are using an arm architecture, comment the image line and uncomment the build line
image: ghcr.io/mrdotb/leagueofreplays:latest
# build: .
command: sh -c "/app/bin/migrate && /app/bin/server"
ports:
- "${PORT}:${PORT}"
- "${SPECTATOR_PORT}:${SPECTATOR_PORT}"
environment:
RIOT_TOKEN: ${RIOT_TOKEN}
OBAN_QUEUES: ${OBAN_QUEUES}
SCHEDULER_PLATFORMS: ${SCHEDULER_PLATFORMS}
QUEUE_PRO_PLATFORMS: ${QUEUE_PRO_PLATFORMS}
DATABASE_URL: "postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}"
S3_ACCESS_KEY: ${S3_ACCESS_KEY}
S3_SECRET_KEY: ${S3_SECRET_KEY}
S3_ENDPOINT: minio
S3_PORT: 9000
S3_PROTO: "http"
S3_REPLAYS_URL: http://${HOST}:9000/replays
S3_PICTURES_URL: http://${HOST}:9000/pictures
SECRET_KEY_BASE: ${SECRET_KEY_BASE}
PHX_HOST: ${HOST}
PHX_SERVER: true
PHX_PORT: ${PORT}
PHX_PUB_PORT: ${PORT}
PHX_PUB_SCHEME: "http"
SPECTATOR_HOST: ${HOST}
SPECTATOR_SERVER: true
SPECTATOR_PORT: ${SPECTATOR_PORT}
SPECTATOR_PUB_PORT: ${SPECTATOR_PORT}
SCHEDULER: ${SCHEDULER}
PRO_SCHEDULER: ${PRO_SCHEDULER}
DDRAGON_CACHE: ${DDRAGON_CACHE}
ADMIN_PASSWORD: ${ADMIN_PASSWORD}
depends_on:
postgres:
condition: service_healthy
volumes:
postgres_lor: {}
minio_lor: {}