Add Docker compose

This commit is contained in:
Ethan Girouard 2024-02-06 09:05:02 -05:00
parent 9f1fece816
commit a04fd80d6d
Signed by: eta357
GPG Key ID: 7BCDC36DFD11C146

54
docker-compose.yml Normal file
View File

@ -0,0 +1,54 @@
name: libretunes
services:
libretunes:
container_name: libretunes
# image: registry.mregirouard.com/libretunes/libretunes:latest
build: .
ports:
- "3000:3000"
environment:
REDIS_URL: redis://redis:6379
POSTGRES_HOST: postgres
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
volumes:
- libretunes-audio:/site/audio
depends_on:
- redis
- postgres
restart: always
redis:
container_name: redis
image: redis:latest
volumes:
- libretunes-redis:/data
restart: always
healthcheck:
test: ["CMD-SHELL", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
postgres:
container_name: postgres
image: postgres:latest
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
volumes:
- libretunes-postgres:/var/lib/postgresql/data
restart: always
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER}"]
interval: 10s
timeout: 5s
retries: 5
volumes:
libretunes-audio:
libretunes-redis:
libretunes-postgres: