Comments (2)
The Joomla container works perfectly well along side Treafik, or any other egress routing software. Which is the easy and simplest way to connect a certificate to your website. I would normally achieve this on a server, with a static IP using the following composer file:
For Treafik
version: "3.3"
services:
traefik:
container_name: traefik
image: "traefik:latest"
command:
- --entrypoints.web.address=:80
- --entrypoints.websecure.address=:443
# - --api.dashboard=true
# - --api.insecure=true
- --providers.docker
- --log.level=INFO
- --certificatesresolvers.joomlaresolver.acme.httpchallenge=true
- --certificatesresolvers.joomlaresolver.acme.keytype=RSA4096
- --certificatesresolvers.joomlaresolver.acme.email=youremail@address.com
- --certificatesresolvers.joomlaresolver.acme.storage=/acme.json
- --certificatesresolvers.joomlaresolver.acme.httpchallenge.entrypoint=web
- --providers.file.directory=/conf
- --providers.file.watch=true
restart: unless-stopped
ports:
- "80:80"
- "443:443"
# - "8080:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- "${JOOMLA_PROJECT_PATH}/traefik/conf:/conf"
- "${JOOMLA_PROJECT_PATH}/traefik/acme.json:/acme.json"
- "${JOOMLA_PROJECT_PATH}/traefik/errors:/errors"
labels:
# settings for all containers
- "traefik.http.routers.http-catchall.rule=hostregexp(`{host:.+}`)"
- "traefik.http.routers.http-catchall.entrypoints=web"
- "traefik.http.routers.http-catchall.middlewares=redirect-to-me"
- "traefik.http.middlewares.redirect-to-me.redirectscheme.scheme=https"
networks:
- traefik
networks:
traefik:
name: traefik_webgateway
For Joomla:
version: '2'
services:
mariadb_your_project_name:
image: mariadb:latest
container_name: mariadb_your_project_name
restart: unless-stopped
environment:
- MARIADB_DATABASE=${JOOMLA_YOUR_PROJECT_NAME_DB}
- MARIADB_USER=${JOOMLA_YOUR_PROJECT_NAME_DB_USER}
- MARIADB_PASSWORD=${JOOMLA_YOUR_PROJECT_NAME_DB_PASS}
- MARIADB_ROOT_PASSWORD=${JOOMLA_YOUR_PROJECT_NAME_DB_ROOT}
volumes:
- "${JOOMLA_PROJECT_PATH}/your_project_name/db:/var/lib/mysql"
networks:
- traefik
joomla_your_project_name:
image: joomla:4.3
container_name: joomla_your_project_name
restart: unless-stopped
environment:
- APACHE_RUN_USER=#1000
- APACHE_RUN_GROUP=#1000
- JOOMLA_DB_HOST=mariadb_your_project_name:3306
- JOOMLA_DB_NAME=${JOOMLA_YOUR_PROJECT_NAME_DB}
- JOOMLA_DB_USER=${JOOMLA_YOUR_PROJECT_NAME_DB_USER}
- JOOMLA_DB_PASSWORD=${JOOMLA_YOUR_PROJECT_NAME_DB_PASS}
depends_on:
- mariadb_your_project_name
volumes:
- "${JOOMLA_PROJECT_PATH}/your_project_name/joomla:/var/www/html"
- "${JOOMLA_PROJECT_PATH}/your_project_name/php.ini:/var/www/html/php.ini"
networks:
- traefik
labels:
# joomla
- "traefik.enable=true"
- "traefik.http.routers.joomla_your_project_name.rule=Host(`www.domain.com`)"
- "traefik.http.routers.joomla_your_project_name.entrypoints=websecure"
- "traefik.http.routers.joomla_your_project_name.tls.certresolver=joomlaresolver"
- "traefik.http.routers.joomla_your_project_name.service=joomla_your_project_name"
- "traefik.http.services.joomla_your_project_name.loadbalancer.server.port=80"
# phpmyadmin_your_project_name:
# image: phpmyadmin/phpmyadmin
# container_name: phpmyadmin_your_project_name
# restart: unless-stopped
# environment:
# PMA_HOST: mariadb_your_project_name
# PMA_PORT: 3306
# UPLOAD_LIMIT: 300M
# depends_on:
# - mariadb_your_project_name
# networks:
# - traefik
# labels:
# # phpmyadmin
# - "traefik.enable=true"
# - "traefik.http.routers.phpmyadmin_your_project_name.rule=Host(`database.domain.com`)"
# - "traefik.http.routers.phpmyadmin_your_project_name.entrypoints=websecure"
# - "traefik.http.routers.phpmyadmin_your_project_name.tls.certresolver=joomlaresolver"
# - "traefik.http.routers.phpmyadmin_your_project_name.service=phpmyadmin_your_project_name"
# - "traefik.http.services.phpmyadmin_your_project_name.loadbalancer.server.port=80"
networks:
traefik:
name: traefik_webgateway
You will need to adapt this for your use case. I make use of Octojoom to manage all this for me.
from docker-joomla.
HEADS-UP
Please note, this line:
- "${JOOMLA_PROJECT_PATH}/traefik/acme.json:/acme.json
You must make sure that this file mounted to your parent system is a json file, and has the most secure access.
I would normally setup this file first before starting my traefik container:
sudo su -
JOOMLA_PROJECT_PATH='/home/path/to/secure/project/files'
echo '{}' > "${JOOMLA_PROJECT_PATH}/traefik/acme.json
chmod 600 "${JOOMLA_PROJECT_PATH}/traefik/acme.json
exit
Without this traefik will not be able to use that file, or create it correctly most of the time.
from docker-joomla.
Related Issues (20)
- Joomla docker commit and restart HOT 1
- Configuration of Joomla! fails on Azure when attempting to install languages HOT 8
- MySQL Connection Error: Access Denied HOT 2
- I want to upgrade Apache to latest version. HOT 8
- Configure CI HOT 2
- Connection refused
- Does not run if --network param is used HOT 2
- Configuration files are exposed HOT 3
- "The connection was reset" on fpm images HOT 1
- Improve the user:group setting of all images HOT 2
- I need Docker Joomla image of version 2.15.4 HOT 3
- Upgrade of Joomla from 3.x to 4.x Media Functions do not work HOT 25
- Updating logo
- How to upgrade Joomla? HOT 1
- Git repo of the Docker official image for joomla. See the Docker Hub page for the full readme on how to use this Docker image and for information regarding contributing and issues. The full readme is generated over in docker-library/docs, specifically in docker-library/docs/joomla. See a change merged here that doesn't show up on the Docker Hub yet? Check the "library/joomla" manifest file in the docker-library/official-images repo, especially PRs with the "library/joomla" label on that repo. For more information about the official images process, see the docker-library/official-images readme.
- Upgrade Joomla with Docker HOT 11
- Complete Deploy of Joomla 4.3 and up HOT 3
- Could not write to the configuration file. HOT 1
- Proposal to Add Environment Variable for Extension Installation HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-joomla.