-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
47 lines (47 loc) · 928 Bytes
/
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
networks:
flask-app:
services:
app:
image: agnes4im/flask-crud-api:v1.0
ports:
- 5000:5000
environment:
DB_HOST: db
DB_USER: flask
DB_PASSWORD: <POSTGRES_PASSWORD>
DB_PORT: 5432
DB_NAME: flask_db
REDIS_HOST: cache
REDIS_PORT: 6379
networks:
- flask-app
depends_on:
db:
condition: service_started
cache:
condition: service_started
db:
image: postgres:14-alpine
restart: always
ports:
- 5432:5432
environment:
POSTGRES_USER: flask
POSTGRES_PASSWORD: <POSTGRES_PASSWORD>
volumes:
- ./data/pgdata:/var/lib/postgresql/data
networks:
- flask-app
cache:
image: redis/redis-stack:latest
restart: always
ports:
- "6379:6379"
- "8001:8001"
volumes:
- ./data/redis_data:/data
networks:
- flask-app
volumes:
pgdata:
redis_data: