forked from OBDDimal/variability.dev-database
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
68 lines (62 loc) · 2.1 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
version: "3"
services:
reverse-proxy:
# The official v2 Traefik docker image
image: traefik:v2.6
# Enables the web UI and tells Traefik to listen to docker
command:
- "--log.level=DEBUG"
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.websecure.address=:443"
- "--certificatesresolvers.myresolver.acme.tlschallenge=true"
#- "--certificatesresolvers.myresolver.acme.caserver=https://acme-staging-v02.api.letsencrypt.org/directory"
- "--certificatesresolvers.myresolver.acme.email=tobias.hess@uni-ulm.com"
- "--certificatesresolvers.myresolver.acme.storage=/letsencrypt/acme.json"
labels:
- traefik.http.routers.to-https.rule=HostRegexp(`{host:.+}`)
- traefik.http.routers.to-https.entrypoints=http
- traefik.http.routers.to-https.middlewares=to-https
ports:
- "443:443"
# The Web UI (enabled by --api.insecure=true)
- "8080:8080"
volumes:
# So that Traefik can listen to the Docker events
- "./letsencrypt:/letsencrypt"
- /var/run/docker.sock:/var/run/docker.sock
db:
image: postgres
restart: always
environment:
POSTGRES_USER: ddueruem
POSTGRES_PASSWORD: ddueruem
POSTGRES_DB: ddueruem
volumes:
- postgresdata:/var/lib/postgresql
backend:
build: ./backend
volumes:
- djangomedia:/api/media
command: ./entrypoint.sh
depends_on:
- db
labels:
- "traefik.enable=true"
- "traefik.http.routers.backend.rule=Host(`doener.tobiasbetz.de`)"
- "traefik.http.routers.backend.entrypoints=websecure"
- "traefik.http.routers.backend.tls.certresolver=myresolver"
frontend:
build: ./frontend
depends_on:
- backend
command: nginx -g 'daemon off;'
labels:
- "traefik.enable=true"
- "traefik.http.routers.frontend.rule=Host(`vm-154-210.bwcloud.uni-ulm.de`)"
- "traefik.http.routers.frontend.entrypoints=websecure"
- "traefik.http.routers.frontend.tls.certresolver=myresolver"
volumes:
postgresdata:
djangomedia: