Fixed for Production and Staging

This commit is contained in:
Nick Yeoman 2023-06-08 00:46:50 -07:00
parent 05f289eae0
commit 9720f10038
4 changed files with 43 additions and 26 deletions

View File

@ -3,6 +3,10 @@
This repository hold all the information Nick has documented about Joomla.
There are also helper files and scripts here.
[Quick Start Guide](https://git.nickyeoman.com/nick/joomla/wiki/Quick-Start)
* [Gitea Repo](https://git.nickyeoman.com/nick/joomla/)
* [Wiki](https://git.nickyeoman.com/nick/joomla/wiki)
* [Issues](https://git.nickyeoman.com/nick/joomla/issues)

View File

@ -37,7 +37,7 @@ docker-compose exec -u www-data joomla php installation/joomla.php install \
--admin-username=$JOOMLA_USERNAME \
--admin-password=$JOOMLA_PASSWORD \
--db-type=mysqli \
--db-host=mariadb \
--db-host=mariadb-joomla \
--db-user=$MYSQL_USER \
--db-pass=$MYSQL_PASSWORD \
--db-name=$MYSQL_DATABASE \

View File

@ -0,0 +1,28 @@
version: '3.8'
services:
joomla:
ports:
- "8000:80"
phpmyadmin:
image: phpmyadmin/phpmyadmin:latest # https://hub.docker.com/_/phpmyadmin
environment:
PMA_USER: ${MYSQL_USER}
PMA_PASSWORD: ${MYSQL_PASSWORD}
PMA_HOST: mariadb-joomla
UPLOAD_LIMIT: '200M'
ports:
- "8001:80"
volumes:
- "/etc/timezone:/etc/timezone:ro"
- "/etc/localtime:/etc/localtime:ro"
mailhog:
image: 'mailhog/mailhog:latest' # https://hub.docker.com/r/mailhog/mailhog
ports:
- "${SMTP_PORT}:1025"
- "8002:8025"
volumes:
- "/etc/timezone:/etc/timezone:ro"
- "/etc/localtime:/etc/localtime:ro"

View File

@ -1,5 +1,13 @@
version: '3.8'
# 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 down
#
# For Production
# docker-compose up -d
# docker-compose down
volumes:
joomla-db:
joomla:
@ -10,7 +18,7 @@ networks:
name: ${NETWORKNAME}
services:
mariadb:
mariadb-joomla:
image: mariadb:10.7.1 # https://hub.docker.com/_/mariadb
restart: always
environment:
@ -27,7 +35,7 @@ services:
image: joomla:4.3.2 # https://hub.docker.com/_/joomla
restart: always
environment:
JOOMLA_DB_HOST: mariadb
JOOMLA_DB_HOST: mariadb-joomla
JOOMLA_DB_USER: ${MYSQL_USER}
JOOMLA_DB_PASSWORD: ${MYSQL_PASSWORD}
JOOMLA_DB_NAME: ${MYSQL_DATABASE}
@ -37,27 +45,4 @@ services:
- ./php/php.ini:/usr/local/etc/php/php.ini
- "/etc/timezone:/etc/timezone:ro"
- "/etc/localtime:/etc/localtime:ro"
ports:
- "8000:80"
phpmyadmin:
image: phpmyadmin/phpmyadmin:latest # https://hub.docker.com/_/phpmyadmin
environment:
PMA_USER: ${MYSQL_USER}
PMA_PASSWORD: ${MYSQL_PASSWORD}
PMA_HOST: mariadb
UPLOAD_LIMIT: '200M'
ports:
- "8001:80"
volumes:
- "/etc/timezone:/etc/timezone:ro"
- "/etc/localtime:/etc/localtime:ro"
mailhog:
image: 'mailhog/mailhog:latest' # https://hub.docker.com/r/mailhog/mailhog
ports:
- "${SMTP_PORT}:1025"
- "8002:8025"
volumes:
- "/etc/timezone:/etc/timezone:ro"
- "/etc/localtime:/etc/localtime:ro"