mirror of
https://github.com/steveiliop56/tinyauth.git
synced 2026-07-17 15:31:13 +00:00
refactor: replace traefik with caddy
This commit is contained in:
+14
-23
@@ -23,30 +23,21 @@ jobs:
|
||||
- name: Set up Docker
|
||||
uses: docker/setup-docker-action@6d7cfa65f60a9dda7b46e5513fa982536f3c9877 # ratchet:docker/setup-docker-action@v5
|
||||
|
||||
- name: Spin up docker-compose
|
||||
run: docker compose -f docker-compose.e2e.yml up --build --force-recreate --remove-orphans -d
|
||||
- name: Install dependencies
|
||||
run: pnpm ci
|
||||
working-directory: e2e
|
||||
|
||||
- name: Check if the url is accessible
|
||||
run: sleep 10s && docker ps && curl -v http://tinyauth.127.0.0.1.sslip.io
|
||||
- name: Install Playwright Browsers
|
||||
run: pnpm exec playwright install --with-deps
|
||||
working-directory: e2e
|
||||
|
||||
# - name: Install dependencies
|
||||
# run: pnpm ci
|
||||
# working-directory: e2e
|
||||
#
|
||||
# - name: Install Playwright Browsers
|
||||
# run: pnpm exec playwright install --with-deps
|
||||
# working-directory: e2e
|
||||
- name: Run Playwright tests
|
||||
run: pnpm test
|
||||
working-directory: e2e
|
||||
|
||||
# - name: Run Playwright tests
|
||||
# run: pnpm test
|
||||
# working-directory: e2e
|
||||
# env:
|
||||
# DOCKER_SOCKET_PATH: ${{ steps.docker-socket.outputs.DOCKER_SOCK }}
|
||||
#
|
||||
# - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # ratchet:actions/upload-artifact@v4
|
||||
# if: ${{ !cancelled() }}
|
||||
# with:
|
||||
# name: playwright-report
|
||||
# path: e2e/playwright-report/
|
||||
# retention-days: 5
|
||||
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # ratchet:actions/upload-artifact@v4
|
||||
if: ${{ !cancelled() }}
|
||||
with:
|
||||
name: playwright-report
|
||||
path: e2e/playwright-report/
|
||||
retention-days: 5
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
auto_https off
|
||||
}
|
||||
|
||||
http://whoami.127.0.0.1.sslip.io {
|
||||
forward_auth tinyauth:3000 {
|
||||
uri /api/auth/caddy
|
||||
copy_headers Remote-User Remote-Name Remote-Email Remote-Groups
|
||||
}
|
||||
reverse_proxy whoami:80
|
||||
}
|
||||
|
||||
http://tinyauth.127.0.0.1.sslip.io {
|
||||
reverse_proxy tinyauth:3000
|
||||
}
|
||||
@@ -1,24 +1,15 @@
|
||||
services:
|
||||
traefik:
|
||||
image: traefik:v3.7.8
|
||||
caddy:
|
||||
image: caddy:2.11.4
|
||||
pull_policy: missing
|
||||
command: |
|
||||
--api.insecure=true
|
||||
--providers.docker
|
||||
--entrypoints.web.address=:80
|
||||
--log.level=INFO
|
||||
ports:
|
||||
- 80:80
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- ./conf:/etc/caddy
|
||||
|
||||
whoami:
|
||||
image: traefik/whoami:v1.11.0
|
||||
pull_policy: missing
|
||||
labels:
|
||||
traefik.enable: true
|
||||
traefik.http.routers.whoami.rule: Host(`whoami.127.0.0.1.sslip.io`)
|
||||
traefik.http.routers.whoami.middlewares: tinyauth
|
||||
|
||||
tinyauth:
|
||||
build:
|
||||
@@ -30,8 +21,4 @@ services:
|
||||
- LDFLAGS=-s -w
|
||||
command: ["--configfile", "/app/config.yaml"]
|
||||
volumes:
|
||||
- ./config.e2e.yaml:/app/config.yaml:ro
|
||||
labels:
|
||||
traefik.enable: true
|
||||
traefik.http.routers.tinyauth.rule: Host(`tinyauth.127.0.0.1.sslip.io`)
|
||||
traefik.http.middlewares.tinyauth.forwardauth.address: http://tinyauth:3000/api/auth/traefik
|
||||
- ./config.e2e.yaml:/app/config.yaml:ro
|
||||
Reference in New Issue
Block a user