-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
36 lines (36 loc) · 1.12 KB
/
docker-compose.yml
File metadata and controls
36 lines (36 loc) · 1.12 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
version: '3.8'
services:
nahpet-app:
image: ghcr.io/anhostfr/nah.pet:latest
restart: always
environment:
NODE_ENV: 'production'
HOST: '0.0.0.0'
PORT: ${PORT:-3000}
DATABASE_URL: 'postgresql://${DB_USER}:${DB_PASSWORD}@nahpet-postgres:5432/${DB_NAME}?schema=public'
ADMIN_EMAIL: '${ADMIN_EMAIL}'
OAUTH_CLIENT_ID: '${OAUTH_CLIENT_ID}'
OAUTH_CLIENT_SECRET: '${OAUTH_CLIENT_SECRET}'
PUBLIC_MAIN_DOMAIN: '${PUBLIC_MAIN_DOMAIN}'
PUBLIC_DOC: '${PUBLIC_DOC:-false}'
PUBLIC_ALLOW_REGISTRATION: '${PUBLIC_ALLOW_REGISTRATION:-true}'
depends_on:
nahpet-postgres:
condition: service_healthy
command: sh -c "npx prisma migrate deploy && node build/index.js"
nahpet-postgres:
image: postgres:16-alpine
restart: always
environment:
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_USER: ${DB_USER}
POSTGRES_DB: ${DB_NAME}
volumes:
- nahpet-postgres-data:/var/lib/postgresql/data
healthcheck:
test: pg_isready -U ${DB_USER} -d ${DB_NAME}
interval: 10s
timeout: 3s
retries: 3
volumes:
nahpet-postgres-data: