-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
44 lines (42 loc) · 1.19 KB
/
docker-compose.yml
File metadata and controls
44 lines (42 loc) · 1.19 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
35
36
37
38
39
40
41
42
43
44
services:
app:
build: .
ports:
- '${DOCKER_HOST_PORT}:${PORT}'
environment:
NODE_ENV: ${NODE_ENV}
HOST: ${HOST:-0.0.0.0}
PORT: ${PORT}
DATABASE_URL: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}?schema=public
JWT_ACCESS_SECRET: ${JWT_ACCESS_SECRET}
JWT_REFRESH_SECRET: ${JWT_REFRESH_SECRET}
JWT_ACCESS_EXPIRES_IN: ${JWT_ACCESS_EXPIRES_IN}
JWT_REFRESH_EXPIRES_IN: ${JWT_REFRESH_EXPIRES_IN}
STORAGE_DIR: /app/storage
BASE_URL: ${BASE_URL}
CORS_ORIGINS: ${CORS_ORIGINS:-}
volumes:
- ./logs:/app/logs
- ./storage:/app/storage
depends_on:
db:
condition: service_healthy
restart: unless-stopped
db:
image: postgres:16-alpine
ports:
- '${POSTGRES_PORT}:5432'
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}']
interval: 5s
timeout: 5s
retries: 5
restart: unless-stopped
volumes:
postgres_data: