Skip to content

Commit fd835e3

Browse files
authored
Joomla with Let's Encrypt Using Docker Compose
1 parent 2018808 commit fd835e3

5 files changed

+183
-141
lines changed

β€Ž.env

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
# Traefik Variables
2-
TRAEFIK_IMAGE_TAG=traefik:2.9
2+
TRAEFIK_IMAGE_TAG=traefik:3.2
3+
# Set the log level (DEBUG, INFO, WARN, ERROR)
34
TRAEFIK_LOG_LEVEL=WARN
4-
TRAEFIK_ACME_EMAIL=[email protected]
5+
# The email address used by Let's Encrypt for renewal notices
6+
TRAEFIK_ACME_EMAIL=[email protected]
7+
# The hostname used to access the Traefik dashboard and to configure domain-specific rules
58
TRAEFIK_HOSTNAME=traefik.joomla.heyvaldemar.net
69
# Basic Authentication for Traefik Dashboard
710
# Username: traefikadmin

β€Ž.github/dependabot.yml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "github-actions" # See documentation for possible values
9+
directory: "/" # Location of package manifests
10+
schedule:
11+
interval: "weekly"

β€Ž.github/workflows/00-deployment-verification.yml

+47-27
Original file line numberDiff line numberDiff line change
@@ -12,39 +12,59 @@ jobs:
1212
deploy-and-test:
1313
runs-on: ubuntu-latest
1414

15+
env:
16+
NETWORK_ONE: joomla-network
17+
NETWORK_TWO: traefik-network
18+
DOCKER_COMPOSE_FILE: joomla-traefik-letsencrypt-docker-compose.yml
19+
APP_HOSTNAME: joomla.heyvaldemar.net
20+
APP_TRAEFIK_HOSTNAME: traefik.joomla.heyvaldemar.net
21+
COMPOSE_PROJECT_NAME: joomla
22+
1523
steps:
16-
- name: Checkout repository
17-
uses: actions/checkout@v4
24+
- name: Checkout repository
25+
uses: actions/checkout@v4
26+
27+
- name: Create necessary Docker networks
28+
run: |
29+
docker network create $NETWORK_ONE || true
30+
docker network create $NETWORK_TWO || true
1831
19-
- name: Set up Docker Buildx
20-
uses: docker/setup-buildx-action@v3
32+
- name: Start up services using Docker Compose
33+
run: docker compose -f $DOCKER_COMPOSE_FILE -p $COMPOSE_PROJECT_NAME up -d
2134

22-
- name: Create necessary Docker networks
23-
run: |
24-
docker network create joomla-network || true
25-
docker network create traefik-network || true
35+
- name: Modify /etc/hosts for internal routing
36+
run: |
37+
echo "127.0.0.1 $APP_HOSTNAME" | sudo tee -a /etc/hosts
38+
echo "127.0.0.1 $APP_TRAEFIK_HOSTNAME" | sudo tee -a /etc/hosts
2639
27-
- name: Start up services using Docker Compose
28-
run: docker compose -f joomla-traefik-letsencrypt-docker-compose.yml up -d
40+
- name: Print Docker Compose services status
41+
run: docker ps
2942

30-
- name: Modify /etc/hosts for internal routing
31-
run: |
32-
echo "127.0.0.1 joomla.heyvaldemar.net" | sudo tee -a /etc/hosts
33-
echo "127.0.0.1 traefik.joomla.heyvaldemar.net" | sudo tee -a /etc/hosts
43+
- name: Wait for the application to be ready via Traefik
44+
run: |
45+
echo "Checking the routing and availability of the application via Traefik..."
46+
timeout 5m bash -c 'while ! curl -fsSLk "https://$APP_HOSTNAME"; do \
47+
echo "Waiting for the application to be ready..."; \
48+
sleep 10; \
49+
done'
3450
35-
- name: Print Docker Compose services status
36-
run: docker ps
51+
- name: Wait for the Traefik dashboard to be ready
52+
run: |
53+
echo "Checking the routing and availability of the Traefik dashboard..."
54+
timeout 5m bash -c 'while ! curl -fsSLk --write-out "%{http_code}" --output /dev/null "https://$APP_TRAEFIK_HOSTNAME" | grep -E "200|401"; do \
55+
echo "Waiting for the application to be ready..."; \
56+
sleep 10; \
57+
done'
3758
38-
- name: Wait for the application to be ready via Traefik
39-
run: |
40-
echo "Checking the routing and availability of application via Traefik..."
41-
timeout 5m bash -c 'while ! curl -fsSLk "https://joomla.heyvaldemar.net/administrator"; do echo "Waiting for the application to be ready..."; sleep 10; done'
59+
- name: Inspect Network Configuration
60+
run: |
61+
docker network inspect $NETWORK_ONE
62+
docker network inspect $NETWORK_TWO
4263
43-
- name: Inspect Network Configuration
44-
run: |
45-
docker network inspect joomla-network
46-
docker network inspect traefik-network
64+
- name: Show container logs on failure
65+
if: failure()
66+
run: docker compose -f $DOCKER_COMPOSE_FILE -p $COMPOSE_PROJECT_NAME logs
4767

48-
- name: Shutdown Docker Compose services
49-
if: always()
50-
run: docker compose -f joomla-traefik-letsencrypt-docker-compose.yml down
68+
- name: Shutdown Docker Compose services
69+
if: always()
70+
run: docker compose -f $DOCKER_COMPOSE_FILE -p $COMPOSE_PROJECT_NAME down

β€ŽREADME.md

+76-25
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Deploy Joomla using Docker Compose:
2222

2323
`docker compose -f joomla-traefik-letsencrypt-docker-compose.yml -p joomla up -d`
2424

25-
# Backups
25+
## Backups
2626

2727
The `backups` container in the configuration is responsible for the following:
2828

@@ -35,7 +35,7 @@ Customizable backup path, filename pattern, and schedule through variables like
3535

3636
By utilizing this container, consistent and automated backups of the essential components of your instance are ensured. Moreover, efficient management of backup storage and tailored backup routines can be achieved through easy and flexible configuration using environment variables.
3737

38-
# joomla-restore-database.sh Description
38+
## joomla-restore-database.sh Description
3939

4040
This script facilitates the restoration of a database backup:
4141

@@ -57,7 +57,7 @@ To make the `joomla-restore-database.shh` script executable, run the following c
5757

5858
Usage of this script ensures a controlled and guided process to restore the database from an existing backup.
5959

60-
# joomla-restore-application-data.sh Description
60+
## joomla-restore-application-data.sh Description
6161

6262
This script is designed to restore the application data:
6363

@@ -79,31 +79,82 @@ To make the `joomla-restore-application-data.sh` script executable, run the foll
7979

8080
By utilizing this script, you can efficiently restore application data from an existing backup while ensuring proper coordination with the running service.
8181

82-
# Author
82+
## Author
8383

84-
I’m Vladimir Mikhalev, the [Docker Captain](https://www.docker.com/captains/vladimir-mikhalev/), but my friends can call me Valdemar.
84+
hey everyone,
8585

86-
🌐 My [website](https://www.heyvaldemar.com/) with detailed IT guides\
87-
🎬 Follow me on [YouTube](https://www.youtube.com/channel/UCf85kQ0u1sYTTTyKVpxrlyQ?sub_confirmation=1)\
88-
🐦 Follow me on [Twitter](https://twitter.com/heyValdemar)\
89-
🎨 Follow me on [Instagram](https://www.instagram.com/heyvaldemar/)\
90-
🧡 Follow me on [Threads](https://www.threads.net/@heyvaldemar)\
91-
🐘 Follow me on [Mastodon](https://mastodon.social/@heyValdemar)\
92-
🧊 Follow me on [Bluesky](https://bsky.app/profile/heyvaldemar.bsky.social)\
93-
🎸 Follow me on [Facebook](https://www.facebook.com/heyValdemarFB/)\
94-
πŸŽ₯ Follow me on [TikTok](https://www.tiktok.com/@heyvaldemar)\
95-
πŸ’» Follow me on [LinkedIn](https://www.linkedin.com/in/heyvaldemar/)\
96-
🐈 Follow me on [GitHub](https://github.com/heyvaldemar)
86+
πŸ’Ύ I’ve been in the IT game for over 20 years, cutting my teeth with some big names like [IBM](https://www.linkedin.com/in/heyvaldemar/), [Thales](https://www.linkedin.com/in/heyvaldemar/), and [Amazon](https://www.linkedin.com/in/heyvaldemar/). These days, I wear the hat of a DevOps Consultant and Team Lead, but what really gets me going is Docker and container technology - I’m kind of obsessed!
9787

98-
# Communication
88+
πŸ’› I have my own IT [blog](https://www.heyvaldemar.com/), where I’ve built a [community](https://discord.gg/AJQGCCBcqf) of DevOps enthusiasts who share my love for all things Docker, containers, and IT technologies in general. And to make sure everyone can jump on this awesome DevOps train, I write super detailed guides (seriously, they’re foolproof!) that help even newbies deploy and manage complex IT solutions.
9989

100-
πŸ‘Ύ Chat with IT pros on [Discord](https://discord.gg/AJQGCCBcqf)\
101-
πŸ“§ Reach me at [email protected]
90+
πŸš€ My dream is to empower every single person in the DevOps community to squeeze every last drop of potential out of Docker and container tech.
10291

103-
# Give Thanks
92+
🐳 As a [Docker Captain](https://www.docker.com/captains/vladimir-mikhalev/), I’m stoked to share my knowledge, experiences, and a good dose of passion for the tech. My aim is to encourage learning, innovation, and growth, and to inspire the next generation of IT whizz-kids to push Docker and container tech to its limits.
10493

105-
πŸ’Ž Support on [GitHub](https://github.com/sponsors/heyValdemar)\
106-
πŸ† Support on [Patreon](https://www.patreon.com/heyValdemar)\
107-
πŸ₯€ Support on [BuyMeaCoffee](https://www.buymeacoffee.com/heyValdemar)\
108-
πŸͺ Support on [Ko-fi](https://ko-fi.com/heyValdemar)\
109-
πŸ’– Support on [PayPal](https://www.paypal.com/paypalme/heyValdemarCOM)
94+
Let’s do this together!
95+
96+
## My 2D Portfolio
97+
98+
πŸ•ΉοΈ Click into [sre.gg](https://www.sre.gg/) β€” my virtual space is a 2D pixel-art portfolio inviting you to interact with elements that encapsulate the milestones of my DevOps career.
99+
100+
## My Courses
101+
102+
πŸŽ“ Dive into my [comprehensive IT courses](https://www.heyvaldemar.com/courses/) designed for enthusiasts and professionals alike. Whether you're looking to master Docker, conquer Kubernetes, or advance your DevOps skills, my courses provide a structured pathway to enhancing your technical prowess.
103+
104+
πŸ”‘ [Each course](https://www.udemy.com/user/heyvaldemar/) is built from the ground up with real-world scenarios in mind, ensuring that you gain practical knowledge and hands-on experience. From beginners to seasoned professionals, there's something here for everyone to elevate their IT skills.
105+
106+
## My Services
107+
108+
πŸ’Ό Take a look at my [service catalog](https://www.heyvaldemar.com/services/) and find out how we can make your technological life better. Whether it's increasing the efficiency of your IT infrastructure, advancing your career, or expanding your technological horizons β€” I'm here to help you achieve your goals. From DevOps transformations to building gaming computers β€” let's make your technology unparalleled!
109+
110+
## Patreon Exclusives
111+
112+
πŸ† Join my [Patreon](https://www.patreon.com/heyvaldemar) and dive deep into the world of Docker and DevOps with exclusive content tailored for IT enthusiasts and professionals. As your experienced guide, I offer a range of membership tiers designed to suit everyone from newbies to IT experts.
113+
114+
## My Recommendations
115+
116+
πŸ“• Check out my collection of [essential DevOps books](https://kit.co/heyvaldemar/essential-devops-books)\
117+
πŸ–₯️ Check out my [studio streaming and recording kit](https://kit.co/heyvaldemar/my-studio-streaming-and-recording-kit)\
118+
πŸ“‘ Check out my [streaming starter kit](https://kit.co/heyvaldemar/streaming-starter-kit)
119+
120+
## Follow Me
121+
122+
🎬 [YouTube](https://www.youtube.com/channel/UCf85kQ0u1sYTTTyKVpxrlyQ?sub_confirmation=1)\
123+
🐦 [X / Twitter](https://twitter.com/heyvaldemar)\
124+
🎨 [Instagram](https://www.instagram.com/heyvaldemar/)\
125+
🐘 [Mastodon](https://mastodon.social/@heyvaldemar)\
126+
🧡 [Threads](https://www.threads.net/@heyvaldemar)\
127+
🎸 [Facebook](https://www.facebook.com/heyvaldemarFB/)\
128+
🧊 [Bluesky](https://bsky.app/profile/heyvaldemar.bsky.social)\
129+
πŸŽ₯ [TikTok](https://www.tiktok.com/@heyvaldemar)\
130+
πŸ’» [LinkedIn](https://www.linkedin.com/in/heyvaldemar/)\
131+
πŸ“£ [daily.dev Squad](https://app.daily.dev/squads/devopscompass)\
132+
🧩 [LeetCode](https://leetcode.com/u/heyvaldemar/)\
133+
🐈 [GitHub](https://github.com/heyvaldemar)
134+
135+
## Community of IT Experts
136+
137+
πŸ‘Ύ [Discord](https://discord.gg/AJQGCCBcqf)
138+
139+
## Refill My Coffee Supplies
140+
141+
πŸ’– [PayPal](https://www.paypal.com/paypalme/heyvaldemarCOM)\
142+
πŸ† [Patreon](https://www.patreon.com/heyvaldemar)\
143+
πŸ’Ž [GitHub](https://github.com/sponsors/heyvaldemar)\
144+
πŸ₯€ [BuyMeaCoffee](https://www.buymeacoffee.com/heyvaldemar)\
145+
πŸͺ [Ko-fi](https://ko-fi.com/heyvaldemar)
146+
147+
🌟 **Bitcoin (BTC):** bc1q2fq0k2lvdythdrj4ep20metjwnjuf7wccpckxc\
148+
πŸ”Ή **Ethereum (ETH):** 0x76C936F9366Fad39769CA5285b0Af1d975adacB8\
149+
πŸͺ™ **Binance Coin (BNB):** bnb1xnn6gg63lr2dgufngfr0lkq39kz8qltjt2v2g6\
150+
πŸ’  **Litecoin (LTC):** LMGrhx8Jsx73h1pWY9FE8GB46nBytjvz8g
151+
152+
<div align="center">
153+
154+
### Show some πŸ’œ by starring some of the [repositories](https://github.com/heyValdemar?tab=repositories)!
155+
156+
![octocat](https://user-images.githubusercontent.com/10498744/210113490-e2fad07f-4488-4da8-a656-b9abbdd8cb26.gif)
157+
158+
</div>
159+
160+
![footer](https://user-images.githubusercontent.com/10498744/210157572-1fca0242-8af2-46a6-bfa3-666ffd40ebde.svg)

0 commit comments

Comments
Β (0)