mirror of
https://github.com/cgzirim/seek-tune.git
synced 2025-12-16 16:34:21 +00:00
chore(docker-compose): update compose config.
This commit is contained in:
parent
28c7a7d4d0
commit
8dcae2456b
1 changed files with 65 additions and 6 deletions
|
|
@ -1,15 +1,21 @@
|
|||
version: '3.1'
|
||||
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'
|
||||
image: seek-tune:latest
|
||||
container_name: seek-tune-app
|
||||
restart: unless-stopped
|
||||
|
||||
ports:
|
||||
- 8080:5000
|
||||
- "${HOST_PORT:-8080}:5000"
|
||||
|
||||
environment:
|
||||
DB_TYPE: ${DB_TYPE:-sqlite}
|
||||
|
|
@ -18,14 +24,67 @@ services:
|
|||
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:/home/seek-tune/db
|
||||
- seek-tune-songs:/home/seek-tune/songs
|
||||
- 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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue