-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
46 lines (41 loc) · 895 Bytes
/
docker-compose.yml
File metadata and controls
46 lines (41 loc) · 895 Bytes
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
version: "3.7"
services:
app:
#image: devops-training-flask-app:0.0.1
build:
context: .
dockerfile: Dockerfile
container_name: my-flask-app-dc
restart: unless-stopped
networks:
- scalian_training
environment:
DB_USER: root
DB_PWD: rootpwd
DB_HOST: db
DB_PORT: 5432
DB_NAME: knights
depends_on:
- db
ports:
- "5001:5000"
db:
image: postgres:16-alpine
container_name: my-flask-app-db
restart: always
ports:
- "32000:5432"
environment:
POSTGRES_PASSWORD: rootpwd
POSTGRES_USER: root
POSTGRES_DB: knights
volumes:
- ./db:/docker-entrypoint-initdb.d
- dbdata:/var/lib/postgresql/data
networks:
scalian_training:
networks:
scalian_training:
driver: bridge
volumes:
dbdata: