-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
43 lines (37 loc) · 923 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
39
40
41
42
43
version: "3.8"
x-db-envs: &db-envs
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-password}
POSTGRES_USER: ${POSTGRES_USER:-user}
POSTGRES_DB: ${POSTGRES_DB:-db}
POSTGRES_TEST_DB: ${POSTGRES_DB:-test_db}
POSTGRES_PORT: ${POSTGRES_PORT:-5432}
services:
backend:
build: ./backend
ports:
- "8000:${BE_INNER_UVICORN_PORT:-8080}"
volumes:
- ./backend:/opt/project
command: "uvicorn rab.main:app --host 0.0.0.0 --port ${BE_INNER_UVICORN_PORT:-8080} --reload"
# command: "uwsgi --ini uwsgi.ini"
environment:
<<: *db-envs
DB_HOST: ${DB_HOST:-db}
# openssl rand -hex 32
SECRET_KEY: ${SECRET_KEY}
depends_on:
- db
db:
image: postgres:13-alpine
environment:
<<: *db-envs
volumes:
- db_volume:/var/lib/postgresql/data
ports:
- 5432:5432
adminer:
image: adminer
ports:
- 8080:8080
volumes:
db_volume: