-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
84 lines (80 loc) · 2.21 KB
/
Copy pathdocker-compose.yml
File metadata and controls
84 lines (80 loc) · 2.21 KB
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
x-logging: &default-logging
driver: "json-file"
options:
max-size: "10m"
max-file: "1"
services:
traefik:
image: "traefik:latest"
container_name: "traefik"
profiles:
- legacy-traefik
environment:
- DOCKER_API_VERSION=1.45
restart: always
ports:
- "80:80"
- "8443:443"
env_file:
- .env
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "letsencrypt_data:/letsencrypt"
command:
- "--entrypoints.web.address=:80"
- "--entrypoints.websecure.address=:443"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--certificatesresolvers.letsencrypt.acme.email=${LETSENCRYPT_EMAIL}"
- "--certificatesresolvers.letsencrypt.acme.storage=/letsencrypt/acme.json"
- "--certificatesresolvers.letsencrypt.acme.httpchallenge.entrypoint=web"
- "--log.level=INFO"
labels:
- "traefik.enable=true"
logging: *default-logging
redis:
image: redis:latest
container_name: 3xui-shop-redis
restart: always
ports:
- "127.0.0.1:6380:6379"
volumes:
- ./.local/redis-data:/data
logging: *default-logging
bot:
build: .
container_name: 3xui-shop-bot
network_mode: host
volumes:
- ./app/data:/app/data
- ./plans.json:/app/data/plans.json
- ./app/locales:/app/locales
- ./app/logs:/app/logs
env_file:
- .env
environment:
- REDIS_HOST=127.0.0.1
- REDIS_PORT=6380
- BOT_PROXY_URL=${BOT_PROXY_URL:-}
stop_signal: SIGINT
restart: unless-stopped
ulimits:
nofile:
soft: 65536
hard: 65536
logging: *default-logging
healthcheck:
test: ["CMD-SHELL", "python -c \"import os, urllib.request; urllib.request.urlopen('http://127.0.0.1:%s/readyz' % os.getenv('BOT_PORT', '8080'), timeout=3).read()\" >/dev/null 2>&1"]
interval: 30s
timeout: 5s
retries: 3
start_period: 30s
command: sh -c "
poetry run pybabel compile -d /app/locales -D bot &&
poetry run alembic -c /app/db/alembic.ini upgrade head &&
poetry run python /app/__main__.py"
depends_on:
- redis
volumes:
redis_data:
letsencrypt_data: