-
-
Notifications
You must be signed in to change notification settings - Fork 143
/
annif.yml
52 lines (48 loc) · 1.43 KB
/
annif.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
# DOMAIN=example.com docker stack deploy -c annif.yml annif
# git clone https://github.com/NatLibFi/Annif .
# cp projects.cfg.dist projects.cfg
# chown -R 1000:1000 annif
services:
nginx:
image: nginx:latest
command: |
bash -c 'bash -s <<EOF
cat > /etc/nginx/conf.d/default.conf <<EON
server {
listen 80;
server_name localhost;
location / {
proxy_pass http://app:8000;
}
}
EON
nginx -g "daemon off;";
EOF'
deploy:
labels:
- traefik.enable=true
- traefik.http.routers.annif-${NUMBER:-1}.rule=Host(`${DOMAIN:-annif.localhost}`)
- traefik.http.routers.annif-${NUMBER:-1}.entrypoints=${SCHEME:-https}
- traefik.http.routers.annif-${NUMBER:-1}.service=annif-${NUMBER:-1}
- traefik.http.routers.annif-${NUMBER:-1}.tls.certresolver=letsencrypt
- traefik.http.services.annif-${NUMBER:-1}.loadbalancer.server.port=80
networks:
- internal
- traefik
app:
image: quay.io/natlibfi/annif:${VERSION:-latest}
user: ${UID:-1000}:${GID:-1000}
volumes:
- ${VOLUME_PATH}annif:/annif-projects
command: ["gunicorn", "annif:create_app()", "--bind", "0.0.0.0:8000", "--timeout", "600"]
networks:
- internal
volumes:
annif:
networks:
internal:
driver: overlay
attachable: true
traefik:
external: true
name: traefik-net