-
Notifications
You must be signed in to change notification settings - Fork 34
/
docker-compose-dev.yml
103 lines (96 loc) · 2.57 KB
/
docker-compose-dev.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# https://blog.thelazyfox.xyz/how-to-create-healthchecks-for-docker/
version: '3.7'
services:
caddy:
build:
context: ./
dockerfile: ./DockerfileCaddy
cap_add:
- NET_ADMIN
ports:
- "6752:6752"
volumes:
- ./CaddyfileDev:/etc/caddy/Caddyfile
- caddy_data:/data
- caddy_config:/config
networks:
- web_network
healthcheck:
test: ["CMD-SHELL", "curl -f http:https://caddy:6752/ --max-time 80 --header 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.3 Safari/605.1.15'"]
interval: 30s
start_period: 20s
timeout: 80s
retries: 3
restart: always
web:
build:
context: ./
dockerfile: ./Dockerfile
command: python3 -m server server
volumes:
# - ./.env:/app/.env
# - ./server/user_data/logs:/app/server/user_data/logs
- .:/app
- ./core/medium_parser/:/app/medium_parser
- ./core/rl_string_helper/:/app/rl_string_helper
# develop:
# watch:
# - action: rebuild
# path: ./server
# target: /app/server
# - action: rebuild
# path: ./core
# target: /app/core
# - action: rebuild
# path: ./rl_string_helper
# target: /app/rl_string_helper
# - action: rebuild
# path: ./database-lib
# target: /app/database-lib
# - action: rebuild
# path: "**/requirements.txt"
# - action: rebuild
# path: "**/requirements-fast.txt"
expose:
- 7080
networks:
- web_network
healthcheck:
test: ["CMD-SHELL", "curl -f http:https://localhost:7080/ --max-time 80 --header 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.3 Safari/605.1.15'"]
interval: 30s
start_period: 20s
timeout: 80s
retries: 3
restart: always
mem_limit: 2g
dragonfly:
image: 'docker.dragonflydb.io/dragonflydb/dragonfly'
ulimits:
memlock: -1
expose:
- 6379
networks:
- web_network
volumes:
- dragonflydata:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 30s
start_period: 20s
timeout: 10s
retries: 3
restart: always
autoheal:
restart: always
image: willfarrell/autoheal
environment:
- AUTOHEAL_CONTAINER_LABEL=all
volumes:
- /var/run/docker.sock:/var/run/docker.sock
volumes:
caddy_data:
caddy_config:
dragonflydata:
networks:
web_network:
driver: bridge