mirror of
https://github.com/cgzirim/seek-tune.git
synced 2025-12-17 00:44:19 +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:
|
volumes:
|
||||||
seek-tune-db:
|
seek-tune-db:
|
||||||
|
driver: local
|
||||||
seek-tune-songs:
|
seek-tune-songs:
|
||||||
|
driver: local
|
||||||
|
seek-tune-recordings:
|
||||||
|
driver: local
|
||||||
|
|
||||||
services:
|
services:
|
||||||
seek-tune:
|
seek-tune:
|
||||||
image: 'seek-tune'
|
image: seek-tune:latest
|
||||||
|
container_name: seek-tune-app
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
ports:
|
ports:
|
||||||
- 8080:5000
|
- "${HOST_PORT:-8080}:5000"
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
DB_TYPE: ${DB_TYPE:-sqlite}
|
DB_TYPE: ${DB_TYPE:-sqlite}
|
||||||
|
|
@ -18,14 +24,67 @@ services:
|
||||||
DB_NAME: ${DB_NAME:-seek_tune_db}
|
DB_NAME: ${DB_NAME:-seek_tune_db}
|
||||||
DB_HOST: ${DB_HOST:-localhost}
|
DB_HOST: ${DB_HOST:-localhost}
|
||||||
DB_PORT: ${DB_PORT:-27017}
|
DB_PORT: ${DB_PORT:-27017}
|
||||||
|
|
||||||
|
ENV: production
|
||||||
REACT_APP_BACKEND_URL: ${REACT_APP_BACKEND_URL:-http://localhost:8080}
|
REACT_APP_BACKEND_URL: ${REACT_APP_BACKEND_URL:-http://localhost:8080}
|
||||||
|
|
||||||
|
SPOTIFY_CLIENT_ID: ${SPOTIFY_CLIENT_ID:-}
|
||||||
|
SPOTIFY_CLIENT_SECRET: ${SPOTIFY_CLIENT_SECRET:-}
|
||||||
|
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
|
dockerfile: Dockerfile
|
||||||
args:
|
args:
|
||||||
REACT_APP_BACKEND_URL: ${REACT_APP_BACKEND_URL:-http://localhost:8080}
|
REACT_APP_BACKEND_URL: ${REACT_APP_BACKEND_URL:-http://localhost:8080}
|
||||||
|
cache_from:
|
||||||
|
- seek-tune:latest
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
- seek-tune-db:/home/seek-tune/db
|
- seek-tune-db:/app/db
|
||||||
- seek-tune-songs:/home/seek-tune/songs
|
- 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