This repository was archived by the owner on Jan 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml.dist
91 lines (85 loc) · 1.97 KB
/
docker-compose.yml.dist
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
services:
db:
image: mysql
restart: always
volumes:
- db:/var/lib/mysql
environment:
MYSQL_DATABASE: ecoindex
MYSQL_USER: ecoindex
MYSQL_PASSWORD: ecoindex
MYSQL_ROOT_PASSWORD: ecoindex
ports:
- "3306:3306"
healthcheck:
test: mysqladmin ping -h 127.0.0.1 -u $$MYSQL_USER --password=$$MYSQL_PASSWORD
timeout: 5s
retries: 10
interval: 2s
api:
build:
context: ./
dockerfile: ./docker/api/dockerfile
restart: always
ports:
- "8001:8000"
environment:
DATABASE_URL: mysql+aiomysql://ecoindex:ecoindex@db/ecoindex?charset=utf8mb4
TZ: Europe/Paris
WORKER_BROKER_URL: redis://redis/0
WORKER_BACKEND_URL: redis://redis/1
depends_on:
db:
condition: service_healthy
worker:
build:
context: ./
dockerfile: ./docker/worker/dockerfile
args:
CHROME_VERSION_MAIN: 111
restart: always
environment:
DATABASE_URL: mysql+aiomysql://ecoindex:ecoindex@db/ecoindex?charset=utf8mb4
TZ: Europe/Paris
WORKER_BROKER_URL: redis://redis/0
WORKER_BACKEND_URL: redis://redis/1
depends_on:
db:
condition: service_healthy
redis:
image: redis:alpine
restart: always
command: redis-server --save 20 1 --loglevel warning
volumes:
- redis:/data
flower:
image: mher/flower
ports:
- "5555:5555"
environment:
CELERY_BROKER_URL: redis://redis/0
FLOWER_BASIC_AUTH: "username:$changeme$"
db-backup:
container_name: db-backup
restart: always
image: tiredofit/db-backup
links:
- db
volumes:
- dbbackup:/backup
environment:
CONTAINER_NAME: db-backup
DB_HOST: db
DB_TYPE: mysql
DB_NAME: ecoindex
DB_USER: ecoindex
DB_PASS: ecoindex
DB_DUMP_FREQ: 1440
DB_DUMP_BEGIN: 0000
DB_CLEANUP_TIME: 8640
COMPRESSION: BZ
MD5: TRUE
volumes:
db:
dbbackup:
redis: