-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
70 lines (67 loc) · 1.83 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
services:
sphinx:
build:
context: sphinx
ports:
- "127.0.0.1:36307:36307" # bind to local interface only!
volumes:
- ./sphinx/data:/opt/sphinx/index
- ./sphinx/sphinx.conf:/opt/sphinx/conf/sphinx.conf
mem_limit: 512m # match indexer.value from sphinx.conf
logging:
driver: syslog
options:
tag: wbc-sphinx
hostname: sphinx-docker
restart: always
# Flask app
app:
build:
context: app
command: "gunicorn wbc:app -b 0.0.0.0:8080 --access-logfile -"
ports:
- "127.0.0.1:8080:8080" # bind a local interface only!
volumes:
- ./app/sitemap:/opt/app/wbc/sitemap
environment:
GIT_HASH: "${GIT_HASH}"
logging:
driver: syslog
options:
tag: wbc-app
hostname: "app-docker-${HOST}"
restart: always
# nginx proxy
nginx:
# https://github.com/macbre/docker-nginx-http3/pkgs/container/nginx-http3
image: ghcr.io/macbre/nginx-http3:1.27.3
volumes:
# mount cache directory
- ./nginx/cache:/var/nginx/cache
# mount site config
- ./nginx/site.conf:/etc/nginx/conf.d/wbc.conf:ro
# common config files
- ./nginx/caching.conf:/etc/nginx/conf.d/caching.conf:ro
ports:
- "${NGINX_HTTP_PORT:-8888}:8080"
logging:
driver: syslog
options:
tag: wbc-nginx
hostname: "nginx-docker-${HOST}"
labels:
traefik.enable: true
traefik.http.routers.wbc.rule: Host(`wbc.macbre.net`)
traefik.http.services.wbc.loadbalancer.server.port: "8080"
restart: always
healthcheck:
# wget -q 0.0.0.0:8080 --spider
test: ["CMD", "wget", "0.0.0.0:8080", "-q", "--spider", "-U", "wget/heathcheck"]
interval: 15s
timeout: 1s
retries: 3
# docker network create public-network
networks:
default:
name: public-network
external: true