-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.sample.yml
More file actions
50 lines (47 loc) · 952 Bytes
/
docker-compose.sample.yml
File metadata and controls
50 lines (47 loc) · 952 Bytes
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
version: "3.9"
services:
web:
image: ####
ports:
- 80:80
api:
image: ####
ports:
- 3000:3000
environment:
ENV_FILES: /run/secrets/api
secrets:
- api
depends_on:
- db
# One-off container, only on first compose up with db.
# migration:
# image: ####
# command: bash -c 'diesel migration run --database-url $$(cat /run/secrets/db-connection)'
# deploy:
# restart_policy:
# condition: on-failure
# secrets:
# - db-connection
# depends_on:
# - db
db:
image: postgres:13-alpine
volumes:
- db:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD_FILE: /run/secrets/db-password
secrets:
- db-password
volumes:
db:
driver_opts:
uid: 0
gid: 0
secrets:
api:
file: _secrets/api.env
db-connection:
file: _secrets/db-connection.txt
db-password:
file: _secrets/db-password.txt