-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GitLab with Let's Encrypt Using Docker Compose
- Loading branch information
1 parent
f2cad5e
commit 59f9908
Showing
2 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Deployment Verification | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
deploy-and-test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Create necessary Docker networks | ||
run: | | ||
docker network create gitlab-network || true | ||
docker network create traefik-network || true | ||
- name: Start up services using Docker Compose | ||
run: docker compose -f gitlab-traefik-letsencrypt-docker-compose.yml up -d | ||
|
||
- name: Modify /etc/hosts for internal routing | ||
run: | | ||
echo "127.0.0.1 gitlab.heyvaldemar.net" | sudo tee -a /etc/hosts | ||
echo "127.0.0.1 traefik.gitlab.heyvaldemar.net" | sudo tee -a /etc/hosts | ||
- name: Print Docker Compose services status | ||
run: docker ps | ||
|
||
- name: Wait for the application to be ready via Traefik | ||
run: | | ||
echo "Checking the routing and availability of application via Traefik..." | ||
timeout 5m bash -c 'while ! curl -fsSLk "https://gitlab.heyvaldemar.net"; do echo "Waiting for the application to be ready..."; sleep 10; done' | ||
- name: Inspect Network Configuration | ||
run: | | ||
docker network inspect gitlab-network | ||
docker network inspect traefik-network | ||
- name: Shutdown Docker Compose services | ||
if: always() | ||
run: docker compose -f gitlab-traefik-letsencrypt-docker-compose.yml down |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters