-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
70 lines (70 loc) · 1.82 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
version: '3'
services:
memslate:
build: .
restart: unless-stopped
ports:
- '5001:5001'
environment:
- DATABASE_URL=postgresql://postgres:postgres@db:5432/memslate
depends_on:
db:
condition: service_healthy
libretranslate:
condition: service_healthy
db:
image: postgres
restart: unless-stopped
ports:
- '127.0.0.1:5432:5432'
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=memslate
volumes:
- db:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
interval: 5s
timeout: 5s
retries: 5
libretranslate:
build:
context: libretranslate
args:
with_models: 'true'
container_name: libretranslate
restart: unless-stopped
healthcheck:
test: ['CMD-SHELL', './venv/bin/python scripts/healthcheck.py']
ports:
- '127.0.0.1:5000:5000'
volumes:
- libretranslate-local:/home/libretranslate/.local
nginx:
image: nginx:1.15-alpine
restart: unless-stopped
volumes:
- ./data/nginx:/etc/nginx/conf.d
- ./data/certbot/conf:/etc/letsencrypt
- ./data/certbot/www:/var/www/certbot
ports:
- "80:80"
- "443:443"
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
certbot:
image: certbot/certbot
restart: unless-stopped
volumes:
- ./data/certbot/conf:/etc/letsencrypt
- ./data/certbot/www:/var/www/certbot
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
volumes:
db:
driver: local
libretranslate-local:
driver: local
nginx_conf:
driver: local
letsencrypt_certs:
driver: local