mirror of
https://github.com/cgzirim/seek-tune.git
synced 2025-12-16 16:34:21 +00:00
90 lines
2.3 KiB
YAML
90 lines
2.3 KiB
YAML
version: '3.8'
|
|
|
|
volumes:
|
|
seek-tune-db:
|
|
driver: local
|
|
seek-tune-songs:
|
|
driver: local
|
|
seek-tune-recordings:
|
|
driver: local
|
|
|
|
services:
|
|
seek-tune:
|
|
image: seek-tune:latest
|
|
container_name: seek-tune-app
|
|
restart: unless-stopped
|
|
|
|
ports:
|
|
- "${HOST_PORT:-8080}:5000"
|
|
|
|
environment:
|
|
DB_TYPE: ${DB_TYPE:-sqlite}
|
|
DB_USER: ${DB_USER:-root}
|
|
DB_PASSWORD: ${DB_PASSWORD:-password}
|
|
DB_NAME: ${DB_NAME:-seek_tune_db}
|
|
DB_HOST: ${DB_HOST:-localhost}
|
|
DB_PORT: ${DB_PORT:-27017}
|
|
|
|
ENV: production
|
|
REACT_APP_BACKEND_URL: ${REACT_APP_BACKEND_URL:-http://localhost:8080}
|
|
|
|
SPOTIFY_CLIENT_ID: ${SPOTIFY_CLIENT_ID:-}
|
|
SPOTIFY_CLIENT_SECRET: ${SPOTIFY_CLIENT_SECRET:-}
|
|
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
args:
|
|
REACT_APP_BACKEND_URL: ${REACT_APP_BACKEND_URL:-http://localhost:8080}
|
|
cache_from:
|
|
- seek-tune:latest
|
|
|
|
volumes:
|
|
- seek-tune-db:/app/db
|
|
- seek-tune-songs:/app/songs
|
|
- seek-tune-recordings:/app/recordings
|
|
# Optional: Mount local songs directory for development
|
|
# - ./server/songs:/app/songs
|
|
|
|
# Resource limits (adjust based on your needs)
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
cpus: '2.0'
|
|
memory: 2G
|
|
reservations:
|
|
cpus: '0.5'
|
|
memory: 512M
|
|
|
|
healthcheck:
|
|
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:5000/"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 10s
|
|
|
|
logging:
|
|
driver: "json-file"
|
|
options:
|
|
max-size: "10m"
|
|
max-file: "3"
|
|
|
|
# Optional: MongoDB service (if using MongoDB instead of SQLite)
|
|
# mongodb:
|
|
# image: mongo:7
|
|
# container_name: seek-tune-mongo
|
|
# restart: unless-stopped
|
|
# environment:
|
|
# MONGO_INITDB_ROOT_USERNAME: ${DB_USER:-root}
|
|
# MONGO_INITDB_ROOT_PASSWORD: ${DB_PASSWORD:-password}
|
|
# MONGO_INITDB_DATABASE: ${DB_NAME:-seek_tune_db}
|
|
# ports:
|
|
# - "27017:27017"
|
|
# volumes:
|
|
# - seek-tune-db:/data/db
|
|
# healthcheck:
|
|
# test: echo 'db.runCommand("ping").ok' | mongosh localhost:27017/test --quiet
|
|
# interval: 10s
|
|
# timeout: 10s
|
|
# retries: 5
|
|
# start_period: 40s
|