-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose-prod.yml
More file actions
34 lines (32 loc) · 1.01 KB
/
docker-compose-prod.yml
File metadata and controls
34 lines (32 loc) · 1.01 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
version: "3"
services:
api:
image: rayalaso/fastapi
depends_on:
- postgres
ports:
- 80:8000
#command: uvicorn app.main:app --host 0.0.0.0 --port 8000
# env_file:
# - ./.env
environment:
- DATABASE_HOSTNAME=${DATABASE_HOSTNAME}
- DATABASE_PORT=${DATABASE_PORT}
- DATABASE_PASSWORD=${DATABASE_PASSWORD}
- DATABASE_NAME=${DATABASE_NAME}
- DATABASE_USERNAME=${DATABASE_USERNAME}
- SECRET_KEY=${SECRET_KEY}
- ALGORITHM=${ALGORITHM}
- ACCESS_TOKEN_EXPIRE_MINUTES=${ACCESS_TOKEN_EXPIRE_MINUTES}
postgres:
image: postgres
# ports:
# - "5432:5432"
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=${DATABASE_PASSWORD}
- POSTGRES_DB=${DATABASE_NAME}
volumes:
- postgres-db:/var/lib/postgresql/data
volumes:
postgres-db: