-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yml
83 lines (78 loc) · 2.23 KB
/
docker-compose.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# Copyright (C) 2018 Sebastian Pipping <sebastian@pipping.org>
# Licensed under GNU Affero GPL v3 or later
version: "3"
networks:
ssl-reverse-proxy:
external: yes
services:
wnpp-debian-net:
depends_on:
- postgres
build:
context: .
dockerfile: docker/Dockerfile
environment:
# KEEP IN SYNC with container "cron" below
WDN_ALLOWED_HOSTS: ${WDN_ALLOWED_HOSTS}
WDN_DEBUG: ${WDN_DEBUG}
WDN_POSTGRES_HOST: postgres
WDN_POSTGRES_NAME: ${WDN_POSTGRES_NAME:?}
WDN_POSTGRES_PASSWORD: ${WDN_POSTGRES_PASSWORD:?}
WDN_POSTGRES_PORT: 5432
WDN_POSTGRES_USER: ${WDN_POSTGRES_USER:?}
WDN_SECRET_KEY: ${WDN_SECRET_KEY:?}
WDN_SENTRY_DSN: ${WDN_SENTRY_DSN}
# KEEP IN SYNC with container "cron" below
ports:
- 127.0.0.1:51080:51080
networks:
- default
- ssl-reverse-proxy
user: 1001:1001
cap_drop:
- ALL
restart: unless-stopped
tty: true
cron:
depends_on:
- postgres
image: ${COMPOSE_PROJECT_NAME:-wnppdebiannet}_wnpp-debian-net
command: ["sh", "-c", "supercronic -sentry-dsn \"${WDN_SENTRY_DSN}\" ~/crontab"]
environment:
# KEEP IN SYNC with container "django" above
WDN_ALLOWED_HOSTS: ${WDN_ALLOWED_HOSTS}
WDN_DEBUG: ${WDN_DEBUG}
WDN_POSTGRES_HOST: postgres
WDN_POSTGRES_NAME: ${WDN_POSTGRES_NAME:?}
WDN_POSTGRES_PASSWORD: ${WDN_POSTGRES_PASSWORD:?}
WDN_POSTGRES_PORT: 5432
WDN_POSTGRES_USER: ${WDN_POSTGRES_USER:?}
WDN_SECRET_KEY: ${WDN_SECRET_KEY:?}
WDN_SENTRY_DSN: ${WDN_SENTRY_DSN}
# KEEP IN SYNC with container "django" above
networks:
- default
user: 1001:1001
cap_drop:
- ALL
restart: unless-stopped
tty: true
postgres:
image: postgres:15.2 # due to postgresql-client version 15.2 in Alpine 3.17
volumes:
- ~/wnpp-debian-net/postgres-data:/var/lib/postgresql/data
environment:
POSTGRES_USER: ${WDN_POSTGRES_USER:?}
POSTGRES_PASSWORD: ${WDN_POSTGRES_PASSWORD:?}
POSTGRES_DB: ${WDN_POSTGRES_NAME:?}
logging:
driver: 'none'
cap_drop:
- ALL
cap_add:
- CHOWN
- DAC_READ_SEARCH
- FOWNER
- SETGID
- SETUID
restart: unless-stopped