-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
39 lines (37 loc) · 817 Bytes
/
docker-compose.yml
File metadata and controls
39 lines (37 loc) · 817 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
version: '3.6'
networks:
fastapi-example:
driver: bridge
services:
api:
build: .
restart: always
ports:
- "5000:5000"
networks:
- fastapi-example
depends_on:
- "db"
command: ["./wait-for-it.sh", "db:5432", "--", "./startup.sh", "0.0.0.0", "5000"]
environment: # Example ENV configuration
LOG_LEVEL: "DEBUG"
DB_USER: "postgres"
DB_PASSWORD: "example"
DB_HOST: "db"
db:
image: postgres
restart: always
networks:
- fastapi-example
environment:
POSTGRES_PASSWORD: example
POSTGRES_HOST_AUTH_METHOD: trust
ports:
- 5432:5432 # Expose this port while running REST service locally
adminer:
image: adminer
networks:
- fastapi-example
restart: always
ports:
- 8080:8080