-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
93 lines (91 loc) · 2.46 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
89
90
91
92
93
version: "3"
services:
oioioi:
image: liquidpl/oioioi
container_name: sio2-oioioi
volumes:
- media:/sio2/deployment/media
- static:/sio2/deployment/static
ports:
- "127.0.0.1:7888:7888"
- "127.0.0.1:9999:9999"
env_file:
- .env
- .oioioi.env
environment:
- VIRTUAL_PROTO=uwsgi
- VIRTUAL_PORT=9000
depends_on:
- postgres
- rabbitmq
restart: always
nginx:
image: nginx:alpine
container_name: sio2-nginx
volumes:
- static:/static
- ./logs:/var/log/nginx
- ./nginx/certs:/etc/nginx/certs:ro
- ./docker-gen/vhost.d:/etc/nginx/vhost.d
- nginx-conf:/etc/nginx/conf.d
- nginx-html:/usr/share/nginx/html
- nginx-dhparam:/etc/nginx/dhparam
labels:
- "com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy=true"
ports:
- "80:80"
- "443:443"
depends_on:
- oioioi
restart: always
docker-gen:
image: jwilder/docker-gen
container_name: sio2-docker-gen
volumes:
- ./docker-gen/templates:/etc/docker-gen/templates
- ./docker-gen/vhost.d:/etc/nginx/vhost.d
- ./nginx/certs:/etc/nginx/certs:ro
- /var/run/docker.sock:/tmp/docker.sock:ro
- nginx-conf:/etc/nginx/conf.d
- nginx-html:/usr/share/nginx/html
labels:
- "com.github.jrcs.letsencrypt_nginx_proxy_companion.docker_gen=true"
command: -notify-sighup sio2-nginx -watch -wait 5s:30s /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf
restart: always
postgres:
image: postgres:15
container_name: sio2-postgres
volumes:
- database:/var/lib/postgresql/data
- ./postgres/init-user.sh:/docker-entrypoint-initdb.d/init-user.sh
env_file:
- .env
restart: always
rabbitmq:
image: rabbitmq:latest
container_name: sio2-rabbitmq
restart: always
letsencrypt:
image: nginxproxy/acme-companion
container_name: sio2-letsencrypt
volumes:
- ./nginx/certs:/etc/nginx/certs
- ./docker-gen/vhost.d:/etc/nginx/vhost.d
- /var/run/docker.sock:/var/run/docker.sock:ro
- nginx-html:/usr/share/nginx/html
- acme:/etc/acme.sh
environment:
- "DEFAULT_EMAIL=${LETSENCRYPT_EMAIL}"
- "NGINX_DOCKER_GEN_CONTAINER=sio2-docker-gen"
- "NGINX_PROXY_CONTAINER=sio2-nginx"
restart: on-failure
depends_on:
- docker-gen
volumes:
database:
media:
static:
nginx-conf:
nginx-html:
nginx-dhparam:
acme: