-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathdocker-compose.yml
91 lines (91 loc) · 3.15 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
84
85
86
87
88
89
90
91
services:
router:
image: traefik:latest
container_name: router
ports:
- 80:80
- 443:443
restart: always
depends_on:
- watchtower
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- ./traefik-acme:/acme
command:
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
- "--entrypoints.websecure.address=:443"
- "--certificatesresolvers.web.acme.storage=/acme/certs.json"
- "--certificatesresolvers.web.acme.httpchallenge.entrypoint=web"
labels:
- "traefik.enable=false"
- "com.centurylinklabs.watchtower.scope=nosh"
couchdb:
image: couchdb:latest
container_name: couchdb
restart: always
depends_on:
- router
- watchtower
env_file:
- ./.env
environment:
COUCHDB_USER: ${COUCHDB_USER}
COUCHDB_PASSWORD: ${COUCHDB_PASSWORD}
volumes:
- ./dbdata:/opt/couchdb/data
- ./dbconfig:/opt/couchdb/etc/local.d
labels:
- "traefik.enable=true"
- "traefik.docker.network=traefik_default"
- "traefik.http.services.couchdb.loadbalancer.server.port=5984"
- "traefik.http.routers.couchdb.entrypoints=web"
- "traefik.http.routers.couchdb.rule=Host(`db.example.com`)"
- "traefik.http.middlewares.couchdb-https-redirect.redirectscheme.scheme=https"
- "traefik.http.routers.couchdb.middlewares=couchdb-https-redirect"
- "traefik.http.routers.couchdb-secure.entrypoints=websecure"
- "traefik.http.routers.couchdb-secure.rule=Host(`db.example.com`)"
- "traefik.http.routers.couchdb-secure.tls=true"
- "traefik.http.routers.couchdb-secure.tls.certresolver=web"
- "traefik.http.routers.couchdb-secure.service=couchdb"
- "com.centurylinklabs.watchtower.scope=nosh"
nosh:
image: shihjay2/nosh3
container_name: nosh
links:
- couchdb
restart: always
depends_on:
- couchdb
- router
- watchtower
env_file:
- ./.env
labels:
- "traefik.enable=true"
- "traefik.docker.network=traefik_default"
- "traefik.http.services.nosh.loadbalancer.server.port=4000"
- "traefik.http.routers.nosh.entrypoints=web"
- "traefik.http.routers.nosh.rule=Host(`example.com`)"
- "traefik.http.middlewares.nosh-https-redirect.redirectscheme.scheme=https"
- "traefik.http.routers.nosh.middlewares=nosh-https-redirect"
- "traefik.http.routers.nosh-secure.entrypoints=websecure"
- "traefik.http.routers.nosh-secure.rule=Host(`example.com`)"
- "traefik.http.routers.nosh-secure.tls=true"
- "traefik.http.routers.nosh-secure.tls.certresolver=web"
- "traefik.http.routers.nosh-secure.service=nosh"
- "com.centurylinklabs.watchtower.scope=nosh"
watchtower:
image: containrrr/watchtower
container_name: watchtower
volumes:
- /var/run/docker.sock:/var/run/docker.sock
command: --interval 30 --scope nosh --cleanup
labels:
- "traefik.enable=false"
networks:
traefik_default:
external: true