40 lines
1.1 KiB
YAML
40 lines
1.1 KiB
YAML
services:
|
|
app:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
args:
|
|
BASE_IMAGE: ${BASE_IMAGE:-mirror.gcr.io/library/node:20-alpine}
|
|
DATABASE_URL: postgresql://postgres:postgres@db:5432/metube?schema=public
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
environment:
|
|
DATABASE_URL: postgresql://postgres:postgres@db:5432/metube?schema=public
|
|
env_file:
|
|
- .env
|
|
ports:
|
|
- "3000:3000"
|
|
volumes:
|
|
- ./videos:/app/videos
|
|
- ./thumbnails:/app/thumbnails
|
|
|
|
db:
|
|
image: ${POSTGRES_IMAGE:-mirror.gcr.io/library/postgres:16-alpine}
|
|
environment:
|
|
POSTGRES_DB: metube
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: postgres
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres -d metube"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
- ./prisma/migrations/0001_init/migration.sql:/docker-entrypoint-initdb.d/001_init.sql:ro
|
|
- ./prisma/migrations/0002_channel_age_gate/migration.sql:/docker-entrypoint-initdb.d/002_channel_age_gate.sql:ro
|
|
|
|
volumes:
|
|
postgres_data:
|