forked from osuAkatsuki/bancho.py
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
70 lines (63 loc) · 1.6 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
version: "3"
services:
mysql:
image: mysql:latest
environment:
MYSQL_USER: ${DB_USER}
MYSQL_PASSWORD: ${DB_PASS}
MYSQL_DATABASE: ${DB_NAME}
NYSQL_HOST: ${DB_HOST}
MYSQL_PORT: ${DB_PORT}
MYSQL_RANDOM_ROOT_PASSWORD: "true"
volumes:
- ./migrations/base.sql:/docker-entrypoint-initdb.d/init.sql:ro
- db-data:/var/lib/mysql
healthcheck:
test: "/usr/bin/mysql --user=$$MYSQL_USER --password=$$MYSQL_PASSWORD --execute \"SHOW DATABASES;\""
interval: 2s
timeout: 20s
retries: 10
# Uncomment to expose the port to the host machine
#ports:
# - ${DB_PORT}:${DB_PORT}
redis:
image: bitnami/redis:latest
user: root
volumes:
- redis-data:/bitnami/redis/data
environment:
- ALLOW_EMPTY_PASSWORD=yes
- REDIS_PASSWORD=${REDIS_PASS}
# Uncomment to expose the port to the host machine
#ports:
# - ${REDIS_PORT}:${REDIS_PORT}
bancho:
build: .
depends_on:
mysql:
condition: service_healthy
redis:
condition: service_started
tty: true
volumes:
- data:/home/bpyuser/.data
- .env:/home/bpyuser/.env:ro
nginx:
image: anroe/nginx-geoip2
depends_on:
- bancho
volumes:
- ./ext/nginx.conf:/etc/nginx/conf.d/default.conf:ro
- ${SSL_CERT_PATH}:/etc/ssl/certs/bancho.pem:ro
- ${SSL_KEY_PATH}:/etc/ssl/private/bancho.key:ro
- data:/.data:ro
ports:
- ${SERVER_PORT}:${SERVER_PORT}
- ${HOST_PORT}:${HOST_PORT}
volumes:
data:
db-data:
redis-data:
networks:
default:
name: bpy-network