2024-12-02 16:51:20 +01:00
|
|
|
# Rx3-Docker/Ampache Docker Image
|
2024-08-25 00:03:07 +02:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
2024-12-02 16:51:20 +01:00
|
|
|
name: ${HOST_NAME_PREFIX}
|
2024-08-25 00:03:07 +02:00
|
|
|
|
|
|
|
services:
|
|
|
|
database:
|
2024-12-02 16:51:20 +01:00
|
|
|
container_name: ${DB_HOST_NAME}
|
|
|
|
hostname: ${DB_HOST_NAME}
|
2024-08-25 00:03:07 +02:00
|
|
|
|
2024-12-02 16:51:20 +01:00
|
|
|
image: ${DB_IMG_URL}
|
|
|
|
|
|
|
|
restart: unless-stopped
|
2024-10-29 08:45:23 +01:00
|
|
|
|
2024-08-25 00:03:07 +02:00
|
|
|
environment:
|
2024-12-02 16:51:20 +01:00
|
|
|
MARIADB_UID: ${DB_USER_ID}
|
|
|
|
MARIADB_GID: ${DB_GROUP_ID}
|
|
|
|
MARIADB_ROOT_HOST: ${DB_ROOT_HOST}
|
|
|
|
MARIADB_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
|
|
|
|
MARIADB_DATABASE: ${DB_DB_NAME}
|
|
|
|
MARIADB_USER: ${DB_DB_USER}
|
|
|
|
MARIADB_PASSWORD: ${DB_DB_PASSWORD}
|
2024-08-27 23:43:01 +02:00
|
|
|
|
2024-10-29 08:51:33 +01:00
|
|
|
healthcheck:
|
2024-12-02 16:51:20 +01:00
|
|
|
test: ["CMD", 'mysqladmin', 'ping', '-h', 'localhost', '-u', 'root', '-p${DB_ROOT_PASSWORD}' ]
|
|
|
|
interval: 10s
|
|
|
|
timeout: 3s
|
|
|
|
retries: 3
|
2024-10-29 08:51:33 +01:00
|
|
|
|
2024-08-25 00:03:07 +02:00
|
|
|
volumes:
|
2024-12-02 16:51:20 +01:00
|
|
|
- ./${DB_LIB_EXT}:${DB_LIB_INT}
|
|
|
|
- ./${DB_LOG_INIT_EXT}:${DB_LOG_INIT_INT}
|
|
|
|
- ./${DB_LOG_SV_EXT}:${DB_LOG_SV_INT}
|
|
|
|
- ./${DB_LOG_MAIN_EXT}:${DB_LOG_MAIN_INT}
|
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-12-02 16:51:20 +01:00
|
|
|
- "127.0.0.1:${DB_PORT_SV_EXT}:${DB_PORT_SV_INT}"
|
|
|
|
- "127.0.0.1:${DB_PORT_MAIN_EXT}:${DB_PORT_MAIN_INT}"
|
2024-08-27 23:43:01 +02:00
|
|
|
|
2024-08-25 00:03:07 +02:00
|
|
|
webapp-internal:
|
2024-12-02 16:51:20 +01:00
|
|
|
container_name: ${WAI_HOST_NAME}
|
|
|
|
hostname: ${WAI_HOST_NAME}
|
2024-08-25 00:03:07 +02:00
|
|
|
|
2024-12-02 16:51:20 +01:00
|
|
|
image: ${WAI_IMG_URL}
|
2024-08-25 00:03:07 +02:00
|
|
|
|
|
|
|
build:
|
2024-12-02 16:51:20 +01:00
|
|
|
context: .
|
2024-08-25 00:03:07 +02:00
|
|
|
args:
|
2024-12-02 16:51:20 +01:00
|
|
|
IMG_NAME: ${WAI_IMG_URL}
|
|
|
|
IMG_NAME_FULL: ${WAI_IMG_NAME_FULL}
|
|
|
|
IMG_VERSION: ${WAI_IMG_VERSION}
|
|
|
|
IMG_MAINTAINER: ${APPL_MAINTAINER}
|
|
|
|
IMG_FROM_URL: ${WAI_IMG_FROM_URL}
|
2024-08-25 00:03:07 +02:00
|
|
|
|
2024-12-02 16:51:20 +01:00
|
|
|
restart: unless-stopped
|
2024-08-25 00:03:07 +02:00
|
|
|
|
2024-10-29 08:51:33 +01:00
|
|
|
depends_on:
|
|
|
|
database:
|
2024-12-02 16:51:20 +01:00
|
|
|
condition: service_healthy
|
2024-10-29 08:51:33 +01:00
|
|
|
|
2024-08-25 00:03:07 +02:00
|
|
|
environment:
|
2024-12-02 16:51:20 +01:00
|
|
|
APACHE_UID: ${WAI_USER_ID}
|
|
|
|
APACHE_GID: ${WAI_GROUP_ID}
|
|
|
|
APACHE_DOC_ROOT: ${APACHE_DOC_ROOT}
|
2024-08-25 00:03:07 +02:00
|
|
|
|
|
|
|
volumes:
|
2024-12-02 16:51:20 +01:00
|
|
|
- ./${WAI_LOG_INIT_EXT}:${WAI_LOG_INIT_INT}
|
|
|
|
- ./${WAI_LOG_SV_EXT}:${WAI_LOG_SV_INT}
|
|
|
|
- ./${WAI_LOG_MAIN_EXT}:${WAI_LOG_MAIN_INT}
|
|
|
|
|
|
|
|
- ./etc/ampache-webapp-internal:/var/www/config
|
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-12-02 16:51:20 +01:00
|
|
|
|
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-12-02 16:51:20 +01:00
|
|
|
- "127.0.0.1:${WAI_PORT_SV_EXT}:${WAI_PORT_SV_INT}"
|
|
|
|
- "127.0.0.1:${WAI_PORT_MAIN_EXT}:${WAI_PORT_MAIN_INT}"
|
2024-08-25 00:03:07 +02:00
|
|
|
|
|
|
|
webapp-external:
|
2024-12-02 16:51:20 +01:00
|
|
|
container_name: ${WAE_HOST_NAME}
|
|
|
|
hostname: ${WAE_HOST_NAME}
|
|
|
|
|
|
|
|
image: ${WAE_IMG_URL}
|
2024-08-25 00:03:07 +02:00
|
|
|
|
2024-12-02 16:51:20 +01:00
|
|
|
restart: unless-stopped
|
2024-08-25 00:03:07 +02:00
|
|
|
|
2024-10-29 08:51:33 +01:00
|
|
|
depends_on:
|
|
|
|
database:
|
2024-12-02 16:51:20 +01:00
|
|
|
condition: service_healthy
|
2024-10-29 08:51:33 +01:00
|
|
|
|
2024-08-25 00:03:07 +02:00
|
|
|
environment:
|
2024-12-02 16:51:20 +01:00
|
|
|
APACHE_UID: ${WAE_USER_ID}
|
|
|
|
APACHE_GID: ${WAE_GROUP_ID}
|
|
|
|
APACHE_DOC_ROOT: ${APACHE_DOC_ROOT}
|
2024-08-25 00:03:07 +02:00
|
|
|
|
|
|
|
volumes:
|
2024-12-02 16:51:20 +01:00
|
|
|
- ./${WAE_LOG_INIT_EXT}:${WAE_LOG_INIT_INT}
|
|
|
|
- ./${WAE_LOG_SV_EXT}:${WAE_LOG_SV_INT}
|
|
|
|
- ./${WAE_LOG_MAIN_EXT}:${WAE_LOG_MAIN_INT}
|
|
|
|
|
|
|
|
- ./etc/ampache-webapp-external:/var/www/config
|
2024-08-25 00:03:07 +02:00
|
|
|
- /etc/passwd:/etc/passwd:ro
|
|
|
|
- /etc/group:/etc/group:ro
|
2024-12-02 16:51:20 +01:00
|
|
|
|
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-12-02 16:51:20 +01:00
|
|
|
- "127.0.0.1:${WAE_PORT_SV_EXT}:${WAE_PORT_SV_INT}"
|
|
|
|
- "127.0.0.1:${WAE_PORT_MAIN_EXT}:${WAE_PORT_MAIN_INT}"
|
2024-08-25 00:03:07 +02:00
|
|
|
|
|
|
|
networks:
|
2024-10-05 18:19:58 +02:00
|
|
|
appl:
|
2024-12-02 16:51:20 +01:00
|
|
|
name: ${NETWORK_NAME}
|
|
|
|
driver: bridge
|
2024-08-25 00:03:07 +02:00
|
|
|
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:
|
2024-12-02 16:51:20 +01:00
|
|
|
- subnet: 10.2.33.0/24
|
|
|
|
gateway: 10.2.33.254
|