# Rx3-Docker/Ampache Docker Image #------------------------------------------------------------------------------- name: ${HOST_NAME_PREFIX} services: database: container_name: ${DB_HOST_NAME} hostname: ${DB_HOST_NAME} image: ${DB_IMG_URL} restart: unless-stopped environment: 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} healthcheck: test: ["CMD", 'mysqladmin', 'ping', '-h', 'localhost', '-u', 'root', '-p${DB_ROOT_PASSWORD}' ] interval: 10s timeout: 3s retries: 3 volumes: - ./${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} networks: - appl ports: - "127.0.0.1:${DB_PORT_SV_EXT}:${DB_PORT_SV_INT}" - "127.0.0.1:${DB_PORT_MAIN_EXT}:${DB_PORT_MAIN_INT}" webapp-internal: container_name: ${WAI_HOST_NAME} hostname: ${WAI_HOST_NAME} image: ${WAI_IMG_URL} build: context: . args: 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} restart: unless-stopped depends_on: database: condition: service_healthy environment: SERVER_CROND_ENABLED: ${WAI_CROND_ENABLED} APACHE_UID: ${WAI_USER_ID} APACHE_GID: ${WAI_GROUP_ID} APACHE_DOC_ROOT: ${APACHE_DOC_ROOT} volumes: - ./${WAI_LOG_INIT_EXT}:${WAI_LOG_INIT_INT} - ./${WAI_LOG_SV_EXT}:${WAI_LOG_SV_INT} - ./${WAI_LOG_HTTPD_EXT}:${WAI_LOG_HTTPD_INT} - ./${WAI_LOG_MAIN_EXT}:${WAI_LOG_MAIN_INT} - ./etc/ampache-webapp-internal:/var/www/config - ./etc/cron.d/ampache:/etc/cron.d/ampache:ro - /etc/passwd:/etc/passwd:ro - /etc/group:/etc/group:ro - /etc/shadow:/etc/shadow:ro - ${MUSIC_REPO}:/media/music - ${VIDEO_REPO}:/media/video networks: - appl ports: - "127.0.0.1:${WAI_PORT_SV_EXT}:${WAI_PORT_SV_INT}" - "127.0.0.1:${WAI_PORT_MAIN_EXT}:${WAI_PORT_MAIN_INT}" webapp-external: container_name: ${WAE_HOST_NAME} hostname: ${WAE_HOST_NAME} image: ${WAE_IMG_URL} restart: unless-stopped depends_on: database: condition: service_healthy environment: APACHE_UID: ${WAE_USER_ID} APACHE_GID: ${WAE_GROUP_ID} APACHE_DOC_ROOT: ${APACHE_DOC_ROOT} volumes: - ./${WAE_LOG_INIT_EXT}:${WAE_LOG_INIT_INT} - ./${WAE_LOG_SV_EXT}:${WAE_LOG_SV_INT} - ./${WAE_LOG_HTTPD_EXT}:${WAE_LOG_HTTPD_INT} - ./${WAE_LOG_MAIN_EXT}:${WAE_LOG_MAIN_INT} - ./etc/ampache-webapp-external:/var/www/config - /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:${WAE_PORT_SV_EXT}:${WAE_PORT_SV_INT}" - "127.0.0.1:${WAE_PORT_MAIN_EXT}:${WAE_PORT_MAIN_INT}" 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