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
|
- name: Set up Docker
|
||||||
uses: docker/setup-docker-action@6d7cfa65f60a9dda7b46e5513fa982536f3c9877 # ratchet:docker/setup-docker-action@v5
|
uses: docker/setup-docker-action@6d7cfa65f60a9dda7b46e5513fa982536f3c9877 # ratchet:docker/setup-docker-action@v5
|
||||||
|
|
||||||
- name: Spin up docker-compose
|
- name: Install dependencies
|
||||||
run: docker compose -f docker-compose.e2e.yml up --build --force-recreate --remove-orphans -d
|
run: pnpm ci
|
||||||
working-directory: e2e
|
working-directory: e2e
|
||||||
|
|
||||||
- name: Check if the url is accessible
|
- name: Install Playwright Browsers
|
||||||
run: sleep 10s && docker ps && curl -v http://tinyauth.127.0.0.1.sslip.io
|
run: pnpm exec playwright install --with-deps
|
||||||
|
working-directory: e2e
|
||||||
|
|
||||||
# - name: Install dependencies
|
- name: Run Playwright tests
|
||||||
# run: pnpm ci
|
run: pnpm test
|
||||||
# working-directory: e2e
|
working-directory: e2e
|
||||||
#
|
|
||||||
# - name: Install Playwright Browsers
|
|
||||||
# run: pnpm exec playwright install --with-deps
|
|
||||||
# working-directory: e2e
|
|
||||||
|
|
||||||
# - name: Run Playwright tests
|
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # ratchet:actions/upload-artifact@v4
|
||||||
# run: pnpm test
|
if: ${{ !cancelled() }}
|
||||||
# working-directory: e2e
|
with:
|
||||||
# env:
|
name: playwright-report
|
||||||
# DOCKER_SOCKET_PATH: ${{ steps.docker-socket.outputs.DOCKER_SOCK }}
|
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:
|
services:
|
||||||
traefik:
|
caddy:
|
||||||
image: traefik:v3.7.8
|
image: caddy:2.11.4
|
||||||
pull_policy: missing
|
pull_policy: missing
|
||||||
command: |
|
|
||||||
--api.insecure=true
|
|
||||||
--providers.docker
|
|
||||||
--entrypoints.web.address=:80
|
|
||||||
--log.level=INFO
|
|
||||||
ports:
|
ports:
|
||||||
- 80:80
|
- 80:80
|
||||||
volumes:
|
volumes:
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
- ./conf:/etc/caddy
|
||||||
|
|
||||||
whoami:
|
whoami:
|
||||||
image: traefik/whoami:v1.11.0
|
image: traefik/whoami:v1.11.0
|
||||||
pull_policy: missing
|
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:
|
tinyauth:
|
||||||
build:
|
build:
|
||||||
@@ -30,8 +21,4 @@ services:
|
|||||||
- LDFLAGS=-s -w
|
- LDFLAGS=-s -w
|
||||||
command: ["--configfile", "/app/config.yaml"]
|
command: ["--configfile", "/app/config.yaml"]
|
||||||
volumes:
|
volumes:
|
||||||
- ./config.e2e.yaml:/app/config.yaml:ro
|
- ./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
|
|
||||||
Reference in New Issue
Block a user