updated the docker compose file

This commit is contained in:
Nick Yeoman 2023-12-16 21:44:00 -08:00
parent f1e74c60fb
commit f8010a6b41

View File

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