-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
executable file
·115 lines (106 loc) · 2.23 KB
/
docker-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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
version: '3.1'
services:
db:
container_name: autopi_db
build:
dockerfile: Dockerfile.db
context: .
restart: unless-stopped
env_file:
- db_public.env
environment:
- POSTGRES_PASSWORD_FILE=/run/secrets/db_password
- POSTGRES_INITDB_WALDIR=/log
command: postgres -c config_file=/etc/postgresql/postgresql.conf
ports:
- "5432:5432"
networks:
- db_net
volumes:
- './src/web/database/postgresql.conf:/etc/postgresql/postgresql.conf'
- db_data:/var/lib/postgresql/data
- db_log:/log
secrets:
- db_password
db_backup:
container_name: autopi_db_backup
image: prodrigestivill/postgres-backup-local
restart: unless-stopped
user: postgres:postgres
volumes:
- /var/opt/pgbackups:/backups # EDIT ME
links:
- db
depends_on:
- db
env_file:
- db_public.env
- db_backup.env
environment:
- POSTGRES_PASSWORD_FILE=/run/secrets/db_password
- POSTGRES_HOST=autopi_db
networks:
- db_net
secrets:
- db_password
api:
container_name: autopi_api
build:
dockerfile: Dockerfile.fastapi
context: .
restart: unless-stopped
ports:
- "8080:80"
networks:
- api_net
- db_net
volumes:
- api_log:/log
env_file:
- db_public.env
environment:
- POSTGRES_PASSWORD_FILE=/run/secrets/db_password
- POSTGRES_HOST=autopi_db
secrets:
- db_password
proxy:
container_name: autopi_rev_proxy
build:
dockerfile: Dockerfile.shib
context: .
restart: unless-stopped
ports:
- "443:443"
networks:
- proxy_net
- api_net
volumes:
#- proxy_config:/config
#- proxy_data:/data
- proxy_log:/log
secrets:
- proxy_cert
- proxy_pkey
- proxy_ca_chain
networks:
db_net:
internal: true
api_net:
internal: true
proxy_net:
volumes:
db_data:
db_log:
api_log:
proxy_config:
proxy_data:
proxy_log:
secrets:
proxy_cert:
file: ./tls/autopi_server.cer
proxy_ca_chain:
file: ./tls/autopi_chain.pem
proxy_pkey:
file: ./tls/autopi_server.key
db_password:
file: .db_password.secret # EDIT ME