mirror of
https://github.com/20kaushik02/spotify-manager.git
synced 2025-12-06 05:34:06 +00:00
46 lines
1.0 KiB
YAML
46 lines
1.0 KiB
YAML
services:
|
|
postgres:
|
|
container_name: spotify-manager-postgres
|
|
image: postgres
|
|
restart: on-failure
|
|
environment:
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
|
POSTGRES_DB: spotify-manager
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
user: postgres
|
|
healthcheck:
|
|
test: ["CMD-SHELL", 'psql -d spotify-manager -c "select version();"']
|
|
interval: 1s
|
|
retries: 5
|
|
timeout: 5s
|
|
redis:
|
|
container_name: spotify-manager-redis
|
|
image: redis
|
|
restart: on-failure
|
|
volumes:
|
|
- redis_data:/data
|
|
user: redis
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "redis-cli ping | grep PONG"]
|
|
interval: 1s
|
|
retries: 5
|
|
timeout: 3s
|
|
api:
|
|
container_name: spotify-manager-api
|
|
image: kaushikr2/spotify-manager-api
|
|
init: true
|
|
restart: on-failure
|
|
ports:
|
|
- 127.0.0.1:9001:9001
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
restart: true
|
|
redis:
|
|
condition: service_healthy
|
|
restart: true
|
|
volumes:
|
|
postgres_data:
|
|
redis_data:
|