version: '3.8' # For Staging # docker-compose -f docker-compose.yml -f docker-compose.staging.yml --env-file .env.staging up -d # # For Production # docker-compose up -d volumes: joomla-db: joomla: networks: default: external: name: ${NETWORKNAME} services: mariadb-joomla: image: mariadb:10.7.1 # https://hub.docker.com/_/mariadb restart: always environment: MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD} MYSQL_USER: ${MYSQL_USER} MYSQL_PASSWORD: ${MYSQL_PASSWORD} MYSQL_DATABASE: ${MYSQL_DATABASE} volumes: - joomla-db:/var/lib/mysql - "/etc/timezone:/etc/timezone:ro" - "/etc/localtime:/etc/localtime:ro" joomla: image: joomla:4.3.2 # https://hub.docker.com/_/joomla restart: always environment: JOOMLA_DB_HOST: mariadb-joomla JOOMLA_DB_USER: ${MYSQL_USER} JOOMLA_DB_PASSWORD: ${MYSQL_PASSWORD} JOOMLA_DB_NAME: ${MYSQL_DATABASE} volumes: - ./html:/var/www/html - ./php/php.ini:/usr/local/etc/php/php.ini - "/etc/timezone:/etc/timezone:ro" - "/etc/localtime:/etc/localtime:ro" links: - mariadb-joomla