ampache-mga9/compose.yaml

122 lines
3.0 KiB
YAML
Raw Normal View History

# Rx3 Ampache Mageia-9 Docker Image
#-------------------------------------------------------------------------------
name: ${APPL_NAME}
services:
database:
container_name: ${DATABASE_CONT_NAME}
image: ${DATABASE_IMG}
restart: unless-stopped
environment:
MARIADB_UID: ${MARIADB_UID}
MARIADB_GID: ${MARIADB_GID}
MARIADB_ROOT_HOST: ${MARIADB_ROOT_HOST}
MARIADB_ROOT_PASSWORD: ${MARIADB_ROOT_PASSWORD}
MARIADB_DATABASE: ${MARIADB_DATABASE}
MARIADB_USER: ${MARIADB_USER}
MARIADB_PASSWORD: ${MARIADB_PASSWORD}
healthcheck:
2024-10-29 09:04:56 +01:00
test: ["CMD", 'mysqladmin', 'ping', '-h', 'localhost', '-u', 'root', '-p${MARIADB_ROOT_PASSWORD}' ]
interval: 10s
timeout: 3s
retries: 3
volumes:
- ./var/lib/mysql:/var/lib/mysql
networks:
- appl
ports:
- "127.0.0.1:${DATABASE_SV_PORT}:9001"
- "127.0.0.1:${DATABASE_PORT}:3306"
webapp-internal:
container_name: ${WEBAPP_INT_CONT_NAME}
image: ${WEBAPP_IMG}
build:
context: .
args:
- IMG_NAME=${APPL_NAME}
- IMG_FULL_NAME=${APPL_FULL_NAME}
- IMG_VERSION=${APPL_VERSION}
- IMG_MAINTAINER=${APPL_MAINTAINER}
- IMG_URL_PREFIX=${APPL_URL_PREFIX}
restart: unless-stopped
depends_on:
database:
condition: service_healthy
environment:
APACHE_UID: ${APACHE_UID}
APACHE_GID: ${APACHE_GID}
APACHE_DOC_ROOT: ${APACHE_DOC_ROOT}
volumes:
- ./etc/ampache-internal:/var/www/config
- ./var/log/ampache-internal:/var/log/ampache
- ./etc/cron.d/ampache:/etc/cron.d/ampache:ro
- /etc/passwd:/etc/passwd:ro
- /etc/group:/etc/group:ro
2024-10-20 17:25:52 +02:00
- /etc/shadow:/etc/shadow:ro
- ${MUSIC_REPO}:/media/music
- ${VIDEO_REPO}:/media/video
networks:
- appl
ports:
- "127.0.0.1:${WEBAPP_INT_SV_PORT}:9001"
- "127.0.0.1:${WEBAPP_INT_PORT}:80"
webapp-external:
container_name: ${WEBAPP_EXT_CONT_NAME}
image: ${WEBAPP_IMG}
restart: unless-stopped
depends_on:
database:
condition: service_healthy
environment:
APACHE_UID: ${APACHE_UID}
APACHE_GID: ${APACHE_GID}
APACHE_DOC_ROOT: ${APACHE_DOC_ROOT}
volumes:
- ./etc/ampache-external:/var/www/config
- ./var/log/ampache-external:/var/log/ampache
- /etc/passwd:/etc/passwd:ro
- /etc/group:/etc/group:ro
- ${MUSIC_REPO}:/media/music
- ${VIDEO_REPO}:/media/video
networks:
- appl
ports:
- "127.0.0.1:${WEBAPP_EXT_SV_PORT}:9001"
- "127.0.0.1:${WEBAPP_EXT_PORT}:80"
networks:
appl:
name: ${NETWORK_NAME}
driver: bridge
driver_opts:
com.docker.network.bridge.name: ${NETWORK_IF_NAME}
ipam:
config:
- subnet: 10.2.33.0/24
gateway: 10.2.33.254