Skip to content

Commit 5411158

Browse files
authored
GitLab with Let's Encrypt Using Docker Compose
1 parent 59f9908 commit 5411158

File tree

5 files changed

+193
-134
lines changed

5 files changed

+193
-134
lines changed

β€Ž.env

+7-4
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.gitlab.heyvaldemar.net
69
# Basic Authentication for Traefik Dashboard
710
# Username: traefikadmin
@@ -10,8 +13,8 @@ TRAEFIK_BASIC_AUTH=traefikadmin:$$2y$$10$$sMzJfirKC75x/hVpiINeZOiSm.Jkity9cn4KwN
1013

1114
# GitLab Variables
1215
GITLAB_POSTGRES_IMAGE_TAG=postgres:14
13-
GITLAB_IMAGE_TAG=gitlab/gitlab-ee:16.2.4-ee.0
14-
GITLAB_RUNNER_IMAGE_TAG=gitlab/gitlab-runner:ubuntu-v16.3.0
16+
GITLAB_IMAGE_TAG=gitlab/gitlab-ee:17.7.2-ee.0
17+
GITLAB_RUNNER_IMAGE_TAG=gitlab/gitlab-runner:ubuntu-v17.7.0
1518
GITLAB_DB_TYPE=postgresql
1619
GITLAB_DB_NAME=gitlabhq_production
1720
GITLAB_DB_USER=gitlab

β€Ž.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: gitlab-network
17+
NETWORK_TWO: traefik-network
18+
DOCKER_COMPOSE_FILE: gitlab-traefik-letsencrypt-docker-compose.yml
19+
APP_HOSTNAME: gitlab.heyvaldemar.net
20+
APP_TRAEFIK_HOSTNAME: traefik.gitlab.heyvaldemar.net
21+
COMPOSE_PROJECT_NAME: gitlab
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 gitlab-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 gitlab-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 gitlab.heyvaldemar.net" | sudo tee -a /etc/hosts
33-
echo "127.0.0.1 traefik.gitlab.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://gitlab.heyvaldemar.net"; 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 gitlab-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 gitlab-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

+79-28
Original file line numberDiff line numberDiff line change
@@ -51,31 +51,82 @@ REGISTRATION_TOKEN=125DGwcgyrAsVVjUkxTL \
5151
--docker-volumes "/var/run/docker.sock:/var/run/docker.sock"
5252
```
5353

54-
# Author
55-
56-
I’m Vladimir Mikhalev, the [Docker Captain](https://www.docker.com/captains/vladimir-mikhalev/), but my friends can call me Valdemar.
57-
58-
🌐 My [website](https://www.heyvaldemar.com/) with detailed IT guides\
59-
🎬 Follow me on [YouTube](https://www.youtube.com/channel/UCf85kQ0u1sYTTTyKVpxrlyQ?sub_confirmation=1)\
60-
🐦 Follow me on [Twitter](https://twitter.com/heyValdemar)\
61-
🎨 Follow me on [Instagram](https://www.instagram.com/heyvaldemar/)\
62-
🧡 Follow me on [Threads](https://www.threads.net/@heyvaldemar)\
63-
🐘 Follow me on [Mastodon](https://mastodon.social/@heyvaldemar)\
64-
🧊 Follow me on [Bluesky](https://bsky.app/profile/heyvaldemar.bsky.social)\
65-
🎸 Follow me on [Facebook](https://www.facebook.com/heyValdemarFB/)\
66-
πŸŽ₯ Follow me on [TikTok](https://www.tiktok.com/@heyvaldemar)\
67-
πŸ’» Follow me on [LinkedIn](https://www.linkedin.com/in/heyvaldemar/)\
68-
🐈 Follow me on [GitHub](https://github.com/heyvaldemar)
69-
70-
# Communication
71-
72-
πŸ‘Ύ Chat with IT pros on [Discord](https://discord.gg/AJQGCCBcqf)\
73-
πŸ“§ Reach me at [email protected]
74-
75-
# Give Thanks
76-
77-
πŸ’Ž Support on [GitHub](https://github.com/sponsors/heyValdemar)\
78-
πŸ† Support on [Patreon](https://www.patreon.com/heyValdemar)\
79-
πŸ₯€ Support on [BuyMeaCoffee](https://www.buymeacoffee.com/heyValdemar)\
80-
πŸͺ Support on [Ko-fi](https://ko-fi.com/heyValdemar)\
81-
πŸ’– Support on [PayPal](https://www.paypal.com/paypalme/heyValdemarCOM)
54+
## Author
55+
56+
hey everyone,
57+
58+
πŸ’Ύ 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!
59+
60+
πŸ’› 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.
61+
62+
πŸš€ 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.
63+
64+
🐳 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.
65+
66+
Let’s do this together!
67+
68+
## My 2D Portfolio
69+
70+
πŸ•ΉοΈ 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.
71+
72+
## My Courses
73+
74+
πŸŽ“ 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.
75+
76+
πŸ”‘ [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.
77+
78+
## My Services
79+
80+
πŸ’Ό 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!
81+
82+
## Patreon Exclusives
83+
84+
πŸ† 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.
85+
86+
## My Recommendations
87+
88+
πŸ“• Check out my collection of [essential DevOps books](https://kit.co/heyvaldemar/essential-devops-books)\
89+
πŸ–₯️ Check out my [studio streaming and recording kit](https://kit.co/heyvaldemar/my-studio-streaming-and-recording-kit)\
90+
πŸ“‘ Check out my [streaming starter kit](https://kit.co/heyvaldemar/streaming-starter-kit)
91+
92+
## Follow Me
93+
94+
🎬 [YouTube](https://www.youtube.com/channel/UCf85kQ0u1sYTTTyKVpxrlyQ?sub_confirmation=1)\
95+
🐦 [X / Twitter](https://twitter.com/heyvaldemar)\
96+
🎨 [Instagram](https://www.instagram.com/heyvaldemar/)\
97+
🐘 [Mastodon](https://mastodon.social/@heyvaldemar)\
98+
🧡 [Threads](https://www.threads.net/@heyvaldemar)\
99+
🎸 [Facebook](https://www.facebook.com/heyvaldemarFB/)\
100+
🧊 [Bluesky](https://bsky.app/profile/heyvaldemar.bsky.social)\
101+
πŸŽ₯ [TikTok](https://www.tiktok.com/@heyvaldemar)\
102+
πŸ’» [LinkedIn](https://www.linkedin.com/in/heyvaldemar/)\
103+
πŸ“£ [daily.dev Squad](https://app.daily.dev/squads/devopscompass)\
104+
🧩 [LeetCode](https://leetcode.com/u/heyvaldemar/)\
105+
🐈 [GitHub](https://github.com/heyvaldemar)
106+
107+
## Community of IT Experts
108+
109+
πŸ‘Ύ [Discord](https://discord.gg/AJQGCCBcqf)
110+
111+
## Refill My Coffee Supplies
112+
113+
πŸ’– [PayPal](https://www.paypal.com/paypalme/heyvaldemarCOM)\
114+
πŸ† [Patreon](https://www.patreon.com/heyvaldemar)\
115+
πŸ’Ž [GitHub](https://github.com/sponsors/heyvaldemar)\
116+
πŸ₯€ [BuyMeaCoffee](https://www.buymeacoffee.com/heyvaldemar)\
117+
πŸͺ [Ko-fi](https://ko-fi.com/heyvaldemar)
118+
119+
🌟 **Bitcoin (BTC):** bc1q2fq0k2lvdythdrj4ep20metjwnjuf7wccpckxc\
120+
πŸ”Ή **Ethereum (ETH):** 0x76C936F9366Fad39769CA5285b0Af1d975adacB8\
121+
πŸͺ™ **Binance Coin (BNB):** bnb1xnn6gg63lr2dgufngfr0lkq39kz8qltjt2v2g6\
122+
πŸ’  **Litecoin (LTC):** LMGrhx8Jsx73h1pWY9FE8GB46nBytjvz8g
123+
124+
<div align="center">
125+
126+
### Show some πŸ’œ by starring some of the [repositories](https://github.com/heyValdemar?tab=repositories)!
127+
128+
![octocat](https://user-images.githubusercontent.com/10498744/210113490-e2fad07f-4488-4da8-a656-b9abbdd8cb26.gif)
129+
130+
</div>
131+
132+
![footer](https://user-images.githubusercontent.com/10498744/210157572-1fca0242-8af2-46a6-bfa3-666ffd40ebde.svg)

0 commit comments

Comments
Β (0)