-
Notifications
You must be signed in to change notification settings - Fork 7
/
dev.docker-compose.yml
90 lines (83 loc) · 2.08 KB
/
dev.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
89
90
# *** Before running this dockerfile: ***
#
# - Edit the config of the OSS service [^1]. Delete and replace with an external
# provider if needed.
#
# - Create file `.env` with the following keys:
# POSTGRES_PASSWORD (Database password),
# MINIO_ACCESS_KEY (OSS access key),
# MINIO_SECRET_KEY (OSS secret key).
#
# - Create or edit file `coordinator/appsettings.dev.json` [^2] so that it
# is consistent with the values you set in the last step. Change the path if
# needed.
#
# - Set up your own Caddy configuration in `Caddyfile` [^3.1]. Edit the port number
# it binds to [^3.2].
#
# - Edit judger configuration based on your setup. Manually connect judgers
# outside Docker if needed. Edit them at [^4].
version: '3'
services:
redis:
image: redis:6
restart: unless-stopped
networks:
- default
psql:
image: postgres:12
restart: unless-stopped
env_file: .env
# ports:
# - 54321:5432
networks:
- default
# [^1]
minio-oss:
image: minio/minio
env_file: .env
restart: unless-stopped
networks:
- default
volumes:
- /data
entrypoint: minio server /data
ports:
- 39000:9000
coordinator:
image: rurikawa-coordinator
restart: unless-stopped
build:
context: .
dockerfile: coordinator.Dockerfile
volumes:
# [^2]: This file below. Change its path if applicable.
- ./coordinator/appsettings.dev.json:/app/appsettings.json
- ./coordinator/certs:/app/certs
depends_on:
- psql
- minio-oss
- redis
# [^4]: Judger config. Edit if needed.
# judger:
# image: rurikawa-judger
# restart: unless-stopped
# build:
# context: judger
# entrypoint: ["/app/rurikawa", "connect", "caddy:80"]
# depends_on:
# - coordinator
caddy:
# image: caddy:2.1.1-alpine
image: rurikawa-web
build:
context: web
restart: unless-stopped
volumes:
# [^3.1]: This file below
- ./Caddyfile:/etc/caddy/Caddyfile
ports:
# [^3.2]: This port binding
- 5000:80
depends_on:
- coordinator