2024-08-25 00:03:07 +02:00
|
|
|
# Rx3 Ampache Mageia-9 Docker Image
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
2024-10-05 18:19:58 +02:00
|
|
|
name: ${APPL_NAME}
|
2024-08-25 00:03:07 +02:00
|
|
|
|
|
|
|
services:
|
|
|
|
database:
|
2024-10-05 18:19:58 +02:00
|
|
|
container_name: ${DATABASE_CONT_NAME}
|
2024-08-25 00:03:07 +02:00
|
|
|
|
2024-10-05 18:19:58 +02:00
|
|
|
image: ${DATABASE_IMG}
|
2024-08-25 00:03:07 +02:00
|
|
|
|
2024-10-29 08:45:23 +01:00
|
|
|
restart: unless-stopped
|
|
|
|
|
2024-08-25 00:03:07 +02:00
|
|
|
environment:
|
2024-08-27 23:43:01 +02:00
|
|
|
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}
|
|
|
|
|
2024-10-29 08:51:33 +01:00
|
|
|
healthcheck:
|
2024-10-29 09:04:56 +01:00
|
|
|
test: ["CMD", 'mysqladmin', 'ping', '-h', 'localhost', '-u', 'root', '-p${MARIADB_ROOT_PASSWORD}' ]
|
2024-10-29 08:51:33 +01:00
|
|
|
interval: 10s
|
|
|
|
timeout: 3s
|
|
|
|
retries: 3
|
|
|
|
|
2024-08-25 00:03:07 +02:00
|
|
|
volumes:
|
2024-10-05 18:19:58 +02:00
|
|
|
- ./var/lib/mysql:/var/lib/mysql
|
2024-08-25 00:03:07 +02:00
|
|
|
|
|
|
|
networks:
|
2024-10-05 18:19:58 +02:00
|
|
|
- appl
|
2024-08-25 00:03:07 +02:00
|
|
|
|
2024-08-27 23:43:01 +02:00
|
|
|
ports:
|
2024-10-05 18:19:58 +02:00
|
|
|
- "127.0.0.1:${DATABASE_SV_PORT}:9001"
|
|
|
|
- "127.0.0.1:${DATABASE_PORT}:3306"
|
2024-08-27 23:43:01 +02:00
|
|
|
|
2024-08-25 00:03:07 +02:00
|
|
|
webapp-internal:
|
2024-10-05 18:19:58 +02:00
|
|
|
container_name: ${WEBAPP_INT_CONT_NAME}
|
2024-08-25 00:03:07 +02:00
|
|
|
|
2024-10-05 18:19:58 +02:00
|
|
|
image: ${WEBAPP_IMG}
|
2024-08-25 00:03:07 +02:00
|
|
|
|
|
|
|
build:
|
|
|
|
context: .
|
|
|
|
args:
|
2024-10-05 18:19:58 +02:00
|
|
|
- IMG_NAME=${APPL_NAME}
|
|
|
|
- IMG_FULL_NAME=${APPL_FULL_NAME}
|
|
|
|
- IMG_VERSION=${APPL_VERSION}
|
|
|
|
- IMG_MAINTAINER=${APPL_MAINTAINER}
|
|
|
|
- IMG_URL_PREFIX=${APPL_URL_PREFIX}
|
2024-08-25 00:03:07 +02:00
|
|
|
|
|
|
|
restart: unless-stopped
|
|
|
|
|
2024-10-29 08:51:33 +01:00
|
|
|
depends_on:
|
|
|
|
database:
|
|
|
|
condition: service_healthy
|
|
|
|
|
2024-08-25 00:03:07 +02:00
|
|
|
environment:
|
2024-10-05 18:19:58 +02:00
|
|
|
APACHE_UID: ${APACHE_UID}
|
|
|
|
APACHE_GID: ${APACHE_GID}
|
|
|
|
APACHE_DOC_ROOT: ${APACHE_DOC_ROOT}
|
2024-08-25 00:03:07 +02:00
|
|
|
|
|
|
|
volumes:
|
2024-10-05 18:19:58 +02:00
|
|
|
- ./etc/ampache-internal:/var/www/config
|
|
|
|
- ./var/log/ampache-internal:/var/log/ampache
|
2024-08-25 00:03:07 +02:00
|
|
|
- ./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
|
2024-10-05 18:19:58 +02:00
|
|
|
- ${MUSIC_REPO}:/media/music
|
|
|
|
- ${VIDEO_REPO}:/media/video
|
2024-08-25 00:03:07 +02:00
|
|
|
|
|
|
|
networks:
|
2024-10-05 18:19:58 +02:00
|
|
|
- appl
|
|
|
|
|
2024-08-25 00:03:07 +02:00
|
|
|
ports:
|
2024-10-05 18:19:58 +02:00
|
|
|
- "127.0.0.1:${WEBAPP_INT_SV_PORT}:9001"
|
|
|
|
- "127.0.0.1:${WEBAPP_INT_PORT}:80"
|
2024-08-25 00:03:07 +02:00
|
|
|
|
|
|
|
webapp-external:
|
2024-10-05 18:19:58 +02:00
|
|
|
container_name: ${WEBAPP_EXT_CONT_NAME}
|
2024-08-25 00:03:07 +02:00
|
|
|
|
2024-10-05 18:19:58 +02:00
|
|
|
image: ${WEBAPP_IMG}
|
2024-08-25 00:03:07 +02:00
|
|
|
|
|
|
|
restart: unless-stopped
|
|
|
|
|
2024-10-29 08:51:33 +01:00
|
|
|
depends_on:
|
|
|
|
database:
|
|
|
|
condition: service_healthy
|
|
|
|
|
2024-08-25 00:03:07 +02:00
|
|
|
environment:
|
2024-10-05 18:19:58 +02:00
|
|
|
APACHE_UID: ${APACHE_UID}
|
|
|
|
APACHE_GID: ${APACHE_GID}
|
|
|
|
APACHE_DOC_ROOT: ${APACHE_DOC_ROOT}
|
2024-08-25 00:03:07 +02:00
|
|
|
|
|
|
|
volumes:
|
2024-10-05 18:19:58 +02:00
|
|
|
- ./etc/ampache-external:/var/www/config
|
|
|
|
- ./var/log/ampache-external:/var/log/ampache
|
2024-08-25 00:03:07 +02:00
|
|
|
- /etc/passwd:/etc/passwd:ro
|
|
|
|
- /etc/group:/etc/group:ro
|
2024-10-05 18:19:58 +02:00
|
|
|
- ${MUSIC_REPO}:/media/music
|
|
|
|
- ${VIDEO_REPO}:/media/video
|
2024-08-25 00:03:07 +02:00
|
|
|
|
|
|
|
networks:
|
2024-10-05 18:19:58 +02:00
|
|
|
- appl
|
|
|
|
|
2024-08-25 00:03:07 +02:00
|
|
|
ports:
|
2024-10-05 18:19:58 +02:00
|
|
|
- "127.0.0.1:${WEBAPP_EXT_SV_PORT}:9001"
|
|
|
|
- "127.0.0.1:${WEBAPP_EXT_PORT}:80"
|
2024-08-25 00:03:07 +02:00
|
|
|
|
|
|
|
networks:
|
2024-10-05 18:19:58 +02:00
|
|
|
appl:
|
|
|
|
name: ${NETWORK_NAME}
|
2024-08-25 00:03:07 +02:00
|
|
|
driver: bridge
|
|
|
|
driver_opts:
|
2024-10-05 18:19:58 +02:00
|
|
|
com.docker.network.bridge.name: ${NETWORK_IF_NAME}
|
2024-08-25 00:03:07 +02:00
|
|
|
ipam:
|
|
|
|
config:
|
|
|
|
- subnet: 10.2.33.0/24
|
|
|
|
gateway: 10.2.33.254
|