-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-swarm.yml
42 lines (38 loc) · 1.02 KB
/
docker-swarm.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
version: "3.9"
services:
app:
image: henbruas/nrk_nynorsk:latest
ports:
- 8000:8000
environment:
ALLOWED_HOSTS: 127.0.0.1,localhost,nrknynorsk.duckdns.org
DB_HOST: 104.248.82.54
DJANGO_SECRET_KEY_FILE: /run/secrets/django_secret_key
DB_PASSWORD_FILE: /run/secrets/postgres_password
SENTRY_DSN: https://[email protected]/5374157
DEBUG: "False"
secrets:
- django_secret_key
- postgres_password
deploy:
update_config:
order: start-first
failure_action: rollback
# db:
# image: postgres:12
# environment:
# POSTGRES_USER: nrk_nynorsk
# POSTGRES_PASSWORD_FILE: /run/secrets/postgres_password
# volumes:
# - db:/var/lib/postgresql/data
# secrets:
# - postgres_password
# healthcheck:
# test: ["CMD", "pg_isready", "-U", "nrk_nynorsk"]
secrets:
django_secret_key:
file: ./django_secret_key.txt
postgres_password:
file: ./postgres_password.txt
volumes:
db: