forked from dainst/idai-field
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.deploy.yml
54 lines (51 loc) · 1.52 KB
/
docker-compose.deploy.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
version: '3.5'
services:
couchdb:
image: couchdb:3.3.2
container_name: field-hub-db
environment:
- COUCHDB_USER
- COUCHDB_PASSWORD
volumes:
- ${DB_DATA_DIRECTORY}:/opt/couchdb/data
labels:
- traefik.enable=true
- traefik.http.routers.db.rule=Host(`db.${HOST}`)
- traefik.http.services.db.loadbalancer.server.port=5984
- traefik.http.routers.db.tls=true
- traefik.http.routers.db.tls.certresolver=myresolver
restart: always
app:
image: "ghcr.io/dainst/field_hub:${FIELD_HUB_VERSION}"
container_name: field-hub-app
environment:
- HOST
- SECRET_KEY_BASE
- COUCHDB_URL=http://couchdb:5984
- COUCHDB_ADMIN_NAME=${COUCHDB_USER}
- COUCHDB_ADMIN_PASSWORD=${COUCHDB_PASSWORD}
- COUCHDB_USER_NAME=${COUCHDB_USER_NAME}
- COUCHDB_USER_PASSWORD=${COUCHDB_USER_PASSWORD}
depends_on:
- "couchdb"
volumes:
- ${FILE_DIRECTORY}:/files
labels:
- traefik.enable=true
- traefik.http.routers.app.rule=Host(`${HOST}`)
- traefik.http.services.app.loadbalancer.server.port=4000
- traefik.http.routers.app.tls=true
- traefik.http.routers.app.tls.certresolver=myresolver
restart: always
traefik:
image: "traefik:v2.4"
ports:
- "80:80"
- "443:443"
command:
- "--docker.domain=${HOST}"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "./acme.json:/acme.json"
- "./traefik.toml:/etc/traefik/traefik.toml"
restart: always