php-apache/compose.yaml

49 lines
1.5 KiB
YAML
Raw Normal View History

# Rx3-Docker/PHP-Apache Docker Image
2024-08-22 14:26:42 +02:00
#-------------------------------------------------------------------------------
name: ${IMG_NAME}
2024-08-22 14:26:42 +02:00
services:
2024-08-22 14:26:42 +02:00
webapp:
container_name: ${IMG_NAME}
hostname: ${IMG_NAME}
image: ${IMG_URL}
2024-08-22 14:26:42 +02:00
build:
context: .
2024-08-22 14:26:42 +02:00
args:
IMG_NAME: ${IMG_NAME}
IMG_NAME_FULL: ${IMG_NAME_FULL}
IMG_VERSION: ${IMG_VERSION}
IMG_MAINTAINER: ${IMG_MAINTAINER}
IMG_FROM_URL: ${IMG_FROM_URL}
APACHE_DOC_ROOT: ${WEBAPP_DOC_ROOT}
APACHE_LOG_DIR: ${WEBAPP_LOG_HTTPD_DIR}
APACHE_PORT: ${WEBAPP_PORT_MAIN_INT}
restart: unless-stopped
environment:
APACHE_UID: ${APACHE_UID}
APACHE_GID: ${APACHE_GID}
APACHE_DOC_ROOT: ${WEBAPP_DOC_ROOT}
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:${WEBAPP_PORT_MAIN_INT}"]
interval: 10s
timeout: 3s
retries: 3
volumes:
# - ./var/www/html:${WEBAPP_DOC_ROOT}
- ./var/log/init:${WEBAPP_LOG_INIT_DIR}
- ./var/log/supervisor:${WEBAPP_LOG_SV_DIR}
- ./var/log/httpd:${WEBAPP_LOG_HTTPD_DIR}
2024-08-22 14:26:42 +02:00
ports:
- "127.0.0.1:${WEBAPP_PORT_SV_EXT}:${WEBAPP_PORT_SV_INT}"
- "127.0.0.1:${WEBAPP_PORT_MAIN_EXT}:${WEBAPP_PORT_MAIN_INT}"