forked from France-ioi/bebras-platform
-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yaml
85 lines (79 loc) · 2.14 KB
/
compose.yaml
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
version: '3'
networks:
app-network:
driver: bridge
services:
core:
build:
context: .
dockerfile: bebras-core.Dockerfile
args:
USE_IR: ${USE_IR}
volumes:
- ./contests-questions-data-be-careful-with-this:/var/www/html/bebras-platform/contestInterface/contests
- ./letsencrypt:/etc/letsencrypt
- ./certbot-etc:/var/lib/letsencrypt
# ports:
# - "80:80"
# - "443:443"
# network_mode: "host"
depends_on:
- certbot
- mysql
extra_hosts: {}
networks:
- app-network
# - "practice-bebras.local:127.0.0.1"
# - "soal-bebras.local:127.0.0.1"
# - "admin-bebras.local:127.0.0.1"
mysql:
image: mysql/mysql-server:5.7
user: root
#network_mode: "host"
ports:
- "3306:7785"
volumes:
- ./mysql-database-be-careful-with-this:/var/lib/mysql:rw
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
networks:
- app-network
certbot:
image: certbot/dns-cloudflare
volumes:
# - ./letsencrypt:/etc/letsencrypt
# - ./certbot-etc:/var/lib/letsencrypt
- ./cloudflare:/cloudflare
environment:
- CERTBOT_DNS_CLOUDFLARE_API_TOKEN=${CLOUDFLARE_API_TOKEN}
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew --dns-cloudflare --dns-cloudflare-credentials /cloudflare/cloudflare.ini; sleep 12h & wait $${!}; done;'"
restart: unless-stopped
networks:
- app-network
#network_mode: "host"
wordpress:
image: wordpress:latest
volumes:
- ./wordpress_data:/var/www/html
- ./uploads.ini:/usr/local/etc/php/conf.d/uploads.ini
environment:
WORDPRESS_DB_HOST: mysql:3306
WORDPRESS_DB_NAME: ${WORDPRESS_DB_NAME}
WORDPRESS_DB_USER: ${WORDPRESS_DB_USER}
WORDPRESS_DB_PASSWORD: ${WORDPRESS_DB_PASSWORD}
depends_on:
- mysql
networks:
- app-network
nginx:
image: nginx:latest
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx-confs/nginx.conf:/etc/nginx/nginx.conf:ro
- ./letsencrypt:/etc/letsencrypt:ro
depends_on:
- core
networks:
- app-network