-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
41 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,22 @@ | ||
on: push | ||
name: Tests | ||
jobs: | ||
local-setup: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 'Checkout code' | ||
uses: actions/checkout@v4 | ||
- name: 'Setup Docker' | ||
uses: docker-practice/actions-setup-docker@master | ||
- name: 'Add hosts to /etc/hosts' | ||
run: | | ||
sudo echo "127.0.0.1 reverse-proxy.test" | sudo tee -a /etc/hosts | ||
sudo echo "127.0.0.1 hello-world.test" | sudo tee -a /etc/hosts | ||
- name: 'Start reverse proxy with local setup' | ||
run: docker-compose -f docker-compose.local.yml up -d && sleep 10 | ||
- name: 'Test dashboard' | ||
run: curl http://reverse-proxy.test/dashboard/#/ | ||
- name: 'Start hello-world example' | ||
run: cd examples && docker-compose -f docker-compose.local.yml up -d | ||
- name: 'Test hello-world' | ||
run: curl http://hello-world.test |
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,19 @@ | ||
version: '3.8' | ||
services: | ||
hello-world: | ||
image: nginx | ||
labels: | ||
- "traefik.enable=true" | ||
- "traefik.docker.network=reverse-proxy-docker-traefik_routing" | ||
- "traefik.http.routers.test.rule=Host(`hello-world.test`)" | ||
- "traefik.http.routers.test.entrypoints=web" | ||
- "traefik.http.services.test.loadbalancer.server.port=80" | ||
- "traefik.http.routers.test-https.rule=Host(`hello-world.test`)" | ||
- "traefik.http.routers.test-https.entrypoints=websecure" | ||
- "traefik.http.routers.test-https.tls=true" | ||
networks: | ||
- reverse-proxy | ||
networks: | ||
reverse-proxy: | ||
name: reverse-proxy-docker-traefik_routing | ||
external: true |