feat: bootstrap NestJS backend with auth, stations, users, health-check, now-playing
This commit is contained in:
68
docker-compose.yml
Normal file
68
docker-compose.yml
Normal file
@@ -0,0 +1,68 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
app:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
container_name: radiola-app
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "3000:3000"
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- DATABASE_URL=postgresql://${POSTGRES_USER:-radiola}:${POSTGRES_PASSWORD:-radiola_pass}@postgres:5432/${POSTGRES_DB:-radiola}?schema=public
|
||||
- REDIS_URL=redis://redis:6379
|
||||
- JWT_SECRET=${JWT_SECRET:-change-me-in-production}
|
||||
- SMTP_HOST=${SMTP_HOST}
|
||||
- SMTP_PORT=${SMTP_PORT:-587}
|
||||
- SMTP_USER=${SMTP_USER}
|
||||
- SMTP_PASS=${SMTP_PASS}
|
||||
- MAIL_FROM=${MAIL_FROM:-noreply@radiola.app}
|
||||
- FRONTEND_URL=${FRONTEND_URL:-https://radiola.app}
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_started
|
||||
networks:
|
||||
- radiola
|
||||
|
||||
postgres:
|
||||
image: postgres:16-alpine
|
||||
container_name: radiola-postgres
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- POSTGRES_USER=${POSTGRES_USER:-radiola}
|
||||
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-radiola_pass}
|
||||
- POSTGRES_DB=${POSTGRES_DB:-radiola}
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
ports:
|
||||
- "127.0.0.1:5432:5432"
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-radiola} -d ${POSTGRES_DB:-radiola}"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
networks:
|
||||
- radiola
|
||||
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
container_name: radiola-redis
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- redis_data:/data
|
||||
ports:
|
||||
- "127.0.0.1:6379:6379"
|
||||
networks:
|
||||
- radiola
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
redis_data:
|
||||
|
||||
networks:
|
||||
radiola:
|
||||
driver: bridge
|
||||
Reference in New Issue
Block a user