forked from testdrivenio/fastapi-vue
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
38 lines (33 loc) · 851 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
version: '3.8'
services:
backend:
build: ./services/backend
ports:
- 5000:5000
environment:
- DATABASE_URL=postgres://hello_fastapi:hello_fastapi@db:5432/hello_fastapi_dev
- SECRET_KEY=09d25e094faa6ca2556c818166b7a9563b93f7099f6f0f4caa6cf63b88e8d3e7
volumes:
- ./services/backend:/app
command: uvicorn src.main:app --reload --host 0.0.0.0 --port 5000
depends_on:
- db
frontend:
build: ./services/frontend
volumes:
- './services/frontend:/app'
- '/app/node_modules'
ports:
- 8080:8080
db:
image: postgres:15.1
expose:
- 5432
environment:
- POSTGRES_USER=hello_fastapi
- POSTGRES_PASSWORD=hello_fastapi
- POSTGRES_DB=hello_fastapi_dev
volumes:
- postgres_data:/var/lib/postgresql/data/
volumes:
postgres_data: