-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathcompose.prod.yml
64 lines (60 loc) · 1.48 KB
/
compose.prod.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
services:
ltb:
build:
context: .
target: ltb_prod
dockerfile: docker/ltb/Dockerfile
restart: always
volumes:
- 'ltb-uploads:/usr/src/app/uploads'
- 'ltb-public:/usr/src/app/public_mirror'
- './.secrets.json:/usr/src/app/.secrets.json:ro'
environment:
PYTHON_PATH: '/usr/local/bin/python3.8'
DATABASE_CHECK: 'db:3306'
DATABASE_URL: 'mysql://ltb:%database_password%@db:3306/ltb'
PRODUCTION_SERVER: 'true'
TRUSTED_PROXIES: 10.9.8.1
env_file:
- docker/ltb_prod.env
depends_on:
- db
networks:
- ltb-network
nginx:
image: nginx:1.27.3-alpine
restart: always
volumes:
- 'ltb-public:/usr/src/app/public:ro'
- './docker/nginx/default.conf:/etc/nginx/conf.d/default.conf:ro'
- './docker/nginx/server.cert:/etc/nginx/certs/server.cert:ro'
- './docker/nginx/server.key:/etc/nginx/certs/server.key:ro'
depends_on:
- ltb
ports:
- '443:443'
networks:
- ltb-network
db:
image: mariadb:10.11.10
command: [ '--character-set-server=utf8mb4', '--collation-server=utf8mb4_unicode_ci' ]
restart: always
environment:
MYSQL_USER: ltb
MYSQL_DATABASE: ltb
env_file:
- docker/db.env
volumes:
- 'ltb-database:/var/lib/mysql'
networks:
- ltb-network
volumes:
ltb-database:
ltb-uploads:
ltb-public:
networks:
ltb-network:
driver: bridge
ipam:
config:
- subnet: 10.9.8.0/24