-
Notifications
You must be signed in to change notification settings - Fork 10
/
docker-compose.yml
59 lines (56 loc) · 2.92 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
version: "3.3"
services:
traefik:
restart: always
image: "traefik:v2.9.1"
container_name: "traefik"
command:
# - "--log.level=DEBUG"
# - "--api.insecure=true"
# - "--api.dashboard=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
- "--entrypoints.websecure.address=:443"
- "--certificatesresolvers.myresolver.acme.tlschallenge=true"
- "--certificatesresolvers.myresolver.acme.httpchallenge.entrypoint=web"
# - "--certificatesresolvers.myresolver.acme.caserver=https://acme-staging-v02.api.letsencrypt.org/directory"
- "--certificatesresolvers.myresolver.acme.email=${LETS_ENCRYPT_EMAIL:? Please set LETS_ENCRYPT_EMAIL environment variable!}"
- "--certificatesresolvers.myresolver.acme.storage=/letsencrypt/acme.json"
- "--ping"
ports:
- "80:80"
- "443:443"
# - "8080:8080"
volumes:
- "./letsencrypt:/letsencrypt"
- "/var/run/docker.sock:/var/run/docker.sock:ro"
healthcheck:
test: ["CMD", "traefik", "healthcheck", "--ping"]
sketch_engine:
restart: always
image: "${IMAGE_NAME:-eltedh/nosketch-engine:latest}"
container_name: "${CONTAINER_NAME:-noske}"
environment:
SERVER_NAME: "${SERVER_NAME:? Please set SERVER_NAME environment variable!}"
SERVER_ALIAS: "${SERVER_ALIAS:? Please set SERVER_ALIAS environment variable!}"
CITATION_LINK: "${CITATION_LINK:-https://github.com/elte-dh/NoSketch-Engine-Docker}"
PRIVATE_KEY: "${PRIVATE_KEY? Please use export PRIVATE_KEY=$(cat secrets/sp.for.eduid.service.hu-key.crt) or set it as empty!}"
PUBLIC_KEY: "${PUBLIC_KEY? Please use export PUBLIC_KEY=$(cat secrets/sp.for.eduid.service.hu-cert.crt) or set it as empty!}"
HTACCESS: "${HTACCESS? Please use export HTACCESS=$(cat secrets/htaccess) or set it as empty!}"
HTPASSWD: "${HTPASSWD? Please use export HTPASSWD=$(cat secrets/htpasswd) or set it as empty!}"
volumes:
- type: bind
source: "${CORPORA_DIR:? Please set CORPORA_DIR environment variable!}"
target: /corpora
labels:
- "traefik.enable=true"
- "traefik.http.routers.myrouter.rule=Host(`${SERVER_ALIAS:? Please set SERVER_ALIAS environment variable!}`)"
- "traefik.http.routers.myrouter.entrypoints=websecure"
- "traefik.http.routers.myrouter.tls.certresolver=myresolver"
- "traefik.http.middlewares.myredirectscheme.redirectscheme.permanent=true"
- "traefik.http.middlewares.myredirectscheme.redirectscheme.scheme=https"
- "traefik.http.routers.myrouterhttp.rule=Host(`${SERVER_ALIAS:? Please set SERVER_ALIAS environment variable!}`)"
- "traefik.http.routers.myrouterhttp.entrypoints=web"
- "traefik.http.routers.myrouterhttp.middlewares=myredirectscheme"
- "traefik.http.routers.myrouterhttp.priority=1" # allow the "/.well-known/acme-challenge/" router to take precedence