forked from Dri0m/flashpoint-submission-system
-
Notifications
You must be signed in to change notification settings - Fork 1
/
dc-db.yml
71 lines (68 loc) · 1.82 KB
/
dc-db.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
version: '3.9'
networks:
fpfssnetwork:
driver: bridge
ipam:
config:
- subnet: 10.50.0.0/16
gateway: 10.50.0.1
services:
database:
container_name: ${DB_CONTAINER_NAME}
restart: unless-stopped
image: mysql:8.0.25
environment:
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
MYSQL_DATABASE: ${DB_NAME}
MYSQL_USER: ${DB_USER}
MYSQL_PASSWORD: ${DB_PASSWORD}
ports:
- "${DB_PORT}:3306" # TODO unmap in prod
volumes:
- fpfssdb_data:/var/lib/mysql
networks:
fpfssnetwork:
ipv4_address: 10.50.0.2
command: mysqld --max_allowed_packet=256M --sql_mode="STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION" --log_bin_trust_function_creators=1
postgres:
container_name: ${POSTGRES_CONTAINER_NAME}
restart: unless-stopped
image: postgres:15
deploy:
resources:
limits:
cpus: '0.50'
memory: 4g
reservations:
memory: 512m
volumes:
- fpfss_postgres_data:/var/lib/postgresql/data
- ./backups/pgdb:/var/lib/postgresql/backups
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
ports:
- "${POSTGRES_PORT}:5432"
networks:
fpfssnetwork:
ipv4_address: 10.50.0.3
validator:
container_name: ${VALIDATOR_CONTAINER_NAME}
restart: unless-stopped
image: fpfss-validator:latest
build:
context: ./validator
dockerfile: Dockerfile
environment:
REPACK_DIR: $REPACK_DIR
volumes:
- $REPACK_DIR:$REPACK_DIR
- $SUBMISSIONS_DIR_FULL_PATH:$SUBMISSIONS_DIR_FULL_PATH
ports:
- "${VALIDATOR_PORT}:8000"
networks:
fpfssnetwork:
ipv4_address: 10.50.0.4
volumes:
fpfssdb_data:
fpfss_postgres_data: