forked from Aeternalis-Ingenium/FastAPI-Backend-Template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
85 lines (81 loc) · 2.35 KB
/
docker-compose.yaml
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
version: '3.9'
services:
db:
image: postgres:latest
container_name: db
restart: always
environment:
- POSTGRES_USER=${POSTGRES_USERNAME}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
- PGDATA=/var/lib/postgresql/data/
volumes:
- postgresql_db_data:/var/lib/postgresql/data/
expose:
- 5432
ports:
- 5433:5432
db_editor:
image: adminer
container_name: db_editor
restart: always
environment:
- POSTGRES_USER=${POSTGRES_USERNAME}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_HOST=${POSTGRES_HOST}
- POSTGRES_PORT=${POSTGRES_PORT}
- POSTGRES_DB=${POSTGRES_DB}
expose:
- 8080
ports:
- 8081:8080
depends_on:
- db
backend_app:
container_name: backend_app
restart: always
build:
dockerfile: Dockerfile
context: ./backend/
environment:
- ENVIRONMENT=${ENVIRONMENT}
- DEBUG=${DEBUG}
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_HOST=${POSTGRES_HOST}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_PORT=${POSTGRES_PORT}
- POSTGRES_SCHEMA=${POSTGRES_SCHEMA}
- POSTGRES_USERNAME=${POSTGRES_USERNAME}
- BACKEND_SERVER_HOST=${BACKEND_SERVER_HOST}
- BACKEND_SERVER_PORT=${BACKEND_SERVER_PORT}
- BACKEND_SERVER_WORKERS=${BACKEND_SERVER_WORKERS}
- DB_TIMEOUT=${DB_TIMEOUT}
- DB_POOL_SIZE=${DB_POOL_SIZE}
- DB_MAX_POOL_CON=${DB_MAX_POOL_CON}
- DB_POOL_OVERFLOW=${DB_POOL_OVERFLOW}
- IS_DB_ECHO_LOG=${IS_DB_ECHO_LOG}
- IS_DB_EXPIRE_ON_COMMIT=${IS_DB_EXPIRE_ON_COMMIT}
- IS_DB_FORCE_ROLLBACK=${IS_DB_FORCE_ROLLBACK}
- IS_ALLOWED_CREDENTIALS=${IS_ALLOWED_CREDENTIALS}
- API_TOKEN=${API_TOKEN}
- AUTH_TOKEN=${AUTH_TOKEN}
- JWT_SECRET_KEY=${JWT_SECRET_KEY}
- JWT_SUBJECT=${JWT_SUBJECT}
- JWT_TOKEN_PREFIX=${JWT_TOKEN_PREFIX}
- JWT_ALGORITHM=${JWT_ALGORITHM}
- JWT_MIN=${JWT_MIN}
- JWT_HOUR=${JWT_HOUR}
- JWT_DAY=${JWT_DAY}
- HASHING_ALGORITHM_LAYER_1=${HASHING_ALGORITHM_LAYER_1}
- HASHING_ALGORITHM_LAYER_2=${HASHING_ALGORITHM_LAYER_2}
- HASHING_SALT=${HASHING_SALT}
volumes:
- ./backend/:/usr/backend/
expose:
- 8000
ports:
- 8001:8000
depends_on:
- db
volumes:
postgresql_db_data: