-
-
Notifications
You must be signed in to change notification settings - Fork 29
/
docker-compose.yml
51 lines (48 loc) · 1.62 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
version: "3.7"
# convenient compose file for Self-hosted LiveSync.
# Initial Author: @arminus
# Modified : @vrtmrz
services:
caddy:
image: lucaslorentz/caddy-docker-proxy:ci-alpine
container_name: caddy
ports:
- 80:80
- 443:443
environment:
- CADDY_INGRESS_NETWORKS=caddy
networks:
- caddy
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./data/caddy:/data
restart: always
couchserver:
image: couchdb:3.1.2
ports:
- "5984:5984"
environment:
- COUCHDB_USER=${COUCHDB_USER}
- COUCHDB_PASSWORD=${COUCHDB_PW}
volumes:
# The files' owner will be id:5984 when you launch the image.
# Because CouchDB writes on-the-fly configurations into local.ini.
# So when you want to perform git pull or change something, you have to change owners back.
- ./data/couchdb:/opt/couchdb/data
- ./conf/local.ini:/opt/couchdb/etc/local.ini
networks:
- caddy
labels:
caddy: ${COUCHDB_SERVER}
# To avoid being crawled by Malicious Web Crawlers,
# - Make index page to be forbidden.
# - Set CouchDB into subdirectory
caddy.handle_path: /*
caddy.handle_path.0_respond: "\"\" 403"
caddy.handle_path.0_header.-Server: ""
caddy.handle_path_1: /e=_/*
caddy.handle_path_1.0_reverse_proxy: "{{upstreams 5984}}"
restart: always
networks:
caddy:
external: true