Files
vod-system/docker-compose.yml

59 lines
1.2 KiB
YAML

services:
postgres:
image: postgres:15
container_name: vod_postgres
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
volumes:
- ${POSTGRES_DATA}:/var/lib/postgresql/data
ports:
- "5432:5432"
backend:
build:
context: .
dockerfile: src/main/Dockerfile
container_name: vod_backend
depends_on:
- postgres
env_file:
- .env
environment:
SPRING_PROFILES_ACTIVE: dev
volumes:
- ${MEDIA_DATA}:/app/data/media
ports:
- "8080:8080"
restart: unless-stopped
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: vod_frontend
environment:
VITE_API_URL: "http://localhost:8080"
VITE_GOOGLE_CLIENT_ID: ${GOOGLE_CLIENT_ID}
depends_on:
- backend
ports:
- "5173:5173"
restart: unless-stopped
rtmp:
build:
context: ./nginx
dockerfile: Dockerfile
container_name: vod_rtmp
environment:
- WEB_SERVER_URL=http://backend:8080
ports:
- "1935:1935"
volumes:
- ${STREAM_DATA}:/stream
pull_policy: build
restart: unless-stopped
depends_on:
- backend