-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose-dev.yml
More file actions
48 lines (45 loc) · 1.1 KB
/
docker-compose-dev.yml
File metadata and controls
48 lines (45 loc) · 1.1 KB
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
services:
api:
build:
context: ./api
dockerfile: Dockerfile
container_name: api
ports:
- 8000:8000
volumes:
- ./api:/app/api
env_file:
- ./api/.env
# environment:
# - DATABASE_HOSTNAME=postgres
# - DATABASE_PORT=5432
# - DATABASE_PASSWORD=password123
# - DATABASE_NAME=fastapi
# - DATABASE_USERNAME=postgres
# - SECRET_KEY=09d25e094faa6ca2556c818166b7a9563b93f7099f6f0f4caa6cf63b88e8d3e7
# - ALGORITHM=HS256
# - ACCESS_TOKEN_EXPIRE_MINUTES=30
command: uvicorn api.main:app --host 0.0.0.0 --port 8000 --reload
depends_on:
- postgres
postgres:
image: postgres:15.6
container_name: postgres
environment:
- POSTGRES_PASSWORD=password123
- POSTGRES_DB=fastapi
volumes:
- postgres-db:/var/lib/postgresql/data
ports:
- "5432:5432"
postgres-test:
image: postgres:15.6
container_name: postgres_test
environment:
- POSTGRES_PASSWORD=password123
- POSTGRES_DB=fastapi_test
ports:
- "5433:5432"
volumes:
postgres-db:
driver: local