-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose prod.yml
More file actions
35 lines (31 loc) · 916 Bytes
/
docker-compose prod.yml
File metadata and controls
35 lines (31 loc) · 916 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
# to run: docker-compose -f "docker-compose prod.yml" up -d --build
# this is for production environment
version: "3"
services:
api:
image: ahmedxfaisal/fast_api
ports:
- 80:8000
depends_on:
- postgres
# envfile:
# - .env
# command: uvicorn app.api_with_db_ORM:app --host 0.0.0.0 --port 8000
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:13
environment:
POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
POSTGRES_DB: ${DATABASE_NAME}
volumes:
- postgres-db:/var/lib/postgresql/data
volumes:
postgres-db: {}