-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yaml
40 lines (37 loc) · 854 Bytes
/
compose.yaml
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
---
services:
fastapi:
build:
context: .
dockerfile: ./Dockerfile
pull_policy: build
image: fastapi
container_name: fastapi
ports:
- 8080:8080
volumes:
- ./src:/code/src
networks:
- fastapi-network
depends_on:
- postgres
postgres:
image: postgres:16.2-alpine
container_name: fastapi-postgres
ports:
- 5432:5432
environment:
- POSTGRES_DB=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=1234
volumes:
- db:/var/lib/postgresql/data
networks:
- fastapi-network
networks:
fastapi-network:
driver: bridge
name: fastapi-network
volumes:
db:
driver: local