-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-prod.yml
59 lines (54 loc) · 1.85 KB
/
docker-compose-prod.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
version: "3.8"
services:
api:
image: solidelections/api
environment:
- DEBUG=${DEBUG}
- PG_HOST=${PG_HOST}
- PG_DBNAME=${PG_DBNAME}
- PG_USER=${PG_USER}
- PG_PASS=${PG_PASS}
- SPARQL_URL=${SPARQL_URL}
deploy:
labels:
- "traefik.enable=true"
- "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
- "traefik.http.services.solid-elections-api.loadbalancer.server.port=8000"
- "traefik.http.routers.solid-elections-api.middlewares=redirect-to-https"
- "traefik.http.routers.solid-elections-api.rule=Host(`${HOST}`)"
- "traefik.http.routers.solid-elections-api.entrypoints=web"
- "traefik.http.routers.solid-elections-api-secure.rule=Host(`${HOST}`)"
- "traefik.http.routers.solid-elections-api-secure.tls=true"
- "traefik.http.routers.solid-elections-api-secure.tls.certresolver=resolver"
db:
image: postgres:alpine
environment:
- POSTGRES_PASSWORD=${PG_PASS}
volumes:
- ./pgdata:/var/lib/postgresql/data
virtuoso:
image: tenforce/virtuoso
environment:
- DBA_PASSWORD=${PG_PASS}
volumes:
- ./virtuoso-data:/data
ports:
- 8890:8890
traefik:
image: traefik:2.2
command:
- "--providers.docker=true"
- "--providers.docker.swarmmode=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
- "--entrypoints.web-secure.address=:443"
- "--certificatesresolvers.resolver.acme.tlschallenge=true"
- "--certificatesresolvers.resolver.acme.email=${LETSENCRYPT_EMAIL}"
- "--certificatesresolvers.resolver.acme.storage=/letsencrypt/acme.json"
- "--log.level=DEBUG"
ports:
- 80:80
- 443:443
volumes:
- ./letsencrypt:/letsencrypt
- /var/run/docker.sock:/var/run/docker.sock:ro