-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
59 lines (57 loc) · 1.33 KB
/
docker-compose.yml
File metadata and controls
59 lines (57 loc) · 1.33 KB
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
services:
app:
#build:
# context: .
# dockerfile: Dockerfile
image: registry.autojidelna.cz/autojidelna:latest
ports:
- target: 80
published: 80
protocol: tcp
mode: host # Or "ingress"
depends_on:
- db
environment:
- APP_PORT=80
- POSTGRES_HOST=db
- POSTGRES_PORT=5432
- POSTGRES_USER_FILE=/run/secrets/postgres_user
- POSTGRES_PASSWORD_FILE=/run/secrets/postgres_password
- POSTGRES_DB_FILE=/run/secrets/postgres_db
secrets:
- postgres_user
- postgres_password
- postgres_db
deploy:
update_config:
parallelism: 1
delay: 10s
restart_policy:
condition: any
db:
image: postgres:13-alpine
deploy:
update_config:
parallelism: 1
delay: 10s
restart_policy:
condition: any
environment:
- POSTGRES_USER_FILE=/run/secrets/postgres_user
- POSTGRES_PASSWORD_FILE=/run/secrets/postgres_password
- POSTGRES_DB_FILE=/run/secrets/postgres_db
secrets:
- postgres_user
- postgres_password
- postgres_db
ports:
- "5432:5432"
volumes:
- /var/lib/postgresql/data:/var/lib/postgresql/data
secrets:
postgres_user:
external: true
postgres_password:
external: true
postgres_db:
external: true