-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
45 lines (43 loc) · 1.1 KB
/
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
44
45
services:
db:
image: postgres:14
container_name: pg_db
restart: always
volumes:
- app-db-data:/var/lib/postgresql/data/pgdata
env_file:
- .docker.env
environment:
- PGDATA=/var/lib/postgresql/data/pgdata
- POSTGRES_PORT=${DB_PORT}
- POSTGRES_DB=${DB_NAME}
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASSWORD}
backend:
build:
context: .
dockerfile: ./Dockerfile
container_name: registry_api
restart: always
depends_on:
- db
ports:
- "8000:8000"
env_file:
- .docker.env
environment:
- DB_HOST=pg_db
- DB_PORT=${DB_PORT}
- DB_NAME=${DB_NAME}
- DB_USER=${DB_USER}
- DB_PASSWORD=${DB_PASSWORD}
- JWT_SECRET_KEY=${JWT_SECRET_KEY}
- JWT_ALGORITHM=${JWT_ALGORITHM}
- JWT_TOKEN_EXPIRE_MINUTES=${JWT_TOKEN_EXPIRE_MINUTES}
- BACKEND_CORS_ORIGINS=${BACKEND_CORS_ORIGINS}
- ACCESS_KEY_LIFESPAN_DAYS=${ACCESS_KEY_LIFESPAN_DAYS}
- ADMIN_PASSWORD=${ADMIN_PASSWORD}
volumes:
- ./coverage:/app/coverage
volumes:
app-db-data: