-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
53 lines (52 loc) · 1.07 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
version: "3"
services:
db:
image: mysql/mysql-server:5.7
restart: always
environment:
MYSQL_USER: test
MYSQL_PASSWORD: test
MYSQL_ROOT_PASSWORD: test
MYSQL_DATABASE: testdb
ports:
- 3306:3306
networks:
- backend
volumes:
- ./sqls:/docker-entrypoint-initdb.d
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
timeout: 20s
retries: 10
redis:
image: redis:latest
restart: always
ports:
- 6379:6379
networks:
- frontend
healthcheck:
test: ["CMD", "redis-cli", "ping"]
timeout: 3s
retries: 10
app:
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
build: .
environment:
- ENV=development
- DEBUG=True
- REDIS_URL=redis://redis:6379/0
- SQLALCHEMY_DATABASE_URI=mysql://test:test@db:3306/testdb
- SQLALCHEMY_TRACK_MODIFICATIONS=False
ports:
- 80:5000
networks:
- backend
- frontend
networks:
backend:
frontend: