-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
45 lines (41 loc) · 1.19 KB
/
docker-compose.yml
File metadata and controls
45 lines (41 loc) · 1.19 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
version: '3.7'
services:
web:
build: ./fastapi-prophet
command: uvicorn app.main:app --reload --workers 1 --host 0.0.0.0 --port 8000
volumes:
- ./fastapi-prophet/:/usr/src/app/
ports:
- 8006:8000
environment:
- ENVIRONMENT:dev
- TESTING:0
- DATABASE_URL=postgresql://prophet_fastapi:hello_fastapi@prophet-db:5432/prophet_dev
- DATABASE_TEST_URL=postgresql://prophet_fastapi:hello_fastapi@prophet-db:5432/prophet_test
depends_on:
- prophet-db
prophet-db:
build:
context: ./fastapi-prophet/db
dockerfile: Dockerfile
expose:
- 5432
environment:
- POSTGRES_USER=prophet_fastapi
- POSTGRES_PASSWORD=hello_fastapi
test:
build:
context: ./fastapi-prophet
dockerfile: ./Dockerfile.prod
command: gunicorn --bind 0.0.0.0:8000 app.main:app -k uvicorn.workers.UvicornWorker
volumes:
- ./fastapi-prophet/:/usr/src/app/
ports:
- 8004:8000
environment:
- PORT:8765
- ENVIRONMENT:dev
- TESTING:1
- DATABASE_URL=sqlite:///sqlite_prod.db
- DATABASE_TEST_URL=sqlite:///sqlite_test.db
- CODECOV_TOKEN=ffff585d-c5e3-4327-8d28-295b2f5d7f17