36 Commits

Author SHA1 Message Date
291d4a77ee Did some changes
All checks were successful
Remote Deployment Pipeline / Prepare Context (pull_request) Successful in 3s
Remote Deployment Pipeline / Deploy (Staging) (pull_request) Has been skipped
Remote Deployment Pipeline / Deploy (Dev/Preview) (pull_request) Successful in 51s
Remote Deployment Pipeline / Cleanup Preview (pull_request) Has been skipped
Remote Deployment Pipeline / Deploy (Production) (pull_request) Has been skipped
2025-12-20 14:49:11 +01:00
cee7c52641 Trying with 90 value
All checks were successful
Remote Deployment Pipeline / Prepare Context (pull_request) Successful in 2s
Remote Deployment Pipeline / Deploy (Staging) (pull_request) Has been skipped
Remote Deployment Pipeline / Deploy (Dev/Preview) (pull_request) Successful in 54s
Remote Deployment Pipeline / Cleanup Preview (pull_request) Has been skipped
Remote Deployment Pipeline / Deploy (Production) (pull_request) Has been skipped
2025-12-20 14:42:42 +01:00
f0697a336d Changed priority
All checks were successful
Remote Deployment Pipeline / Prepare Context (pull_request) Successful in 2s
Remote Deployment Pipeline / Deploy (Staging) (pull_request) Has been skipped
Remote Deployment Pipeline / Deploy (Dev/Preview) (pull_request) Successful in 52s
Remote Deployment Pipeline / Cleanup Preview (pull_request) Has been skipped
Remote Deployment Pipeline / Deploy (Production) (pull_request) Has been skipped
2025-12-20 14:40:11 +01:00
c7ba97cd55 Changed priority values
All checks were successful
Remote Deployment Pipeline / Prepare Context (pull_request) Successful in 2s
Remote Deployment Pipeline / Deploy (Staging) (pull_request) Has been skipped
Remote Deployment Pipeline / Deploy (Dev/Preview) (pull_request) Successful in 54s
Remote Deployment Pipeline / Cleanup Preview (pull_request) Has been skipped
Remote Deployment Pipeline / Deploy (Production) (pull_request) Has been skipped
2025-12-20 14:36:12 +01:00
ebeebd8950 Force recreate
All checks were successful
Remote Deployment Pipeline / Prepare Context (pull_request) Successful in 3s
Remote Deployment Pipeline / Deploy (Staging) (pull_request) Has been skipped
Remote Deployment Pipeline / Deploy (Dev/Preview) (pull_request) Successful in 1m10s
Remote Deployment Pipeline / Cleanup Preview (pull_request) Has been skipped
Remote Deployment Pipeline / Deploy (Production) (pull_request) Has been skipped
2025-12-20 14:31:45 +01:00
e1894c89fd Added acme handler
All checks were successful
Remote Deployment Pipeline / Prepare Context (pull_request) Successful in 3s
Remote Deployment Pipeline / Deploy (Staging) (pull_request) Has been skipped
Remote Deployment Pipeline / Deploy (Dev/Preview) (pull_request) Successful in 53s
Remote Deployment Pipeline / Cleanup Preview (pull_request) Has been skipped
Remote Deployment Pipeline / Deploy (Production) (pull_request) Has been skipped
2025-12-20 14:29:17 +01:00
715840dbb1 Force recreate
All checks were successful
Remote Deployment Pipeline / Prepare Context (pull_request) Successful in 3s
Remote Deployment Pipeline / Deploy (Staging) (pull_request) Has been skipped
Remote Deployment Pipeline / Deploy (Dev/Preview) (pull_request) Successful in 49s
Remote Deployment Pipeline / Cleanup Preview (pull_request) Has been skipped
Remote Deployment Pipeline / Deploy (Production) (pull_request) Has been skipped
2025-12-20 14:25:47 +01:00
a88191b339 Testing this out
All checks were successful
Remote Deployment Pipeline / Prepare Context (pull_request) Successful in 2s
Remote Deployment Pipeline / Deploy (Staging) (pull_request) Has been skipped
Remote Deployment Pipeline / Deploy (Dev/Preview) (pull_request) Successful in 59s
Remote Deployment Pipeline / Cleanup Preview (pull_request) Has been skipped
Remote Deployment Pipeline / Deploy (Production) (pull_request) Has been skipped
2025-12-20 14:23:45 +01:00
495e2c8432 Merge branch 'main' into fix-acme
All checks were successful
Remote Deployment Pipeline / Prepare Context (pull_request) Successful in 4s
Remote Deployment Pipeline / Deploy (Staging) (pull_request) Has been skipped
Remote Deployment Pipeline / Deploy (Dev/Preview) (pull_request) Successful in 49s
Remote Deployment Pipeline / Cleanup Preview (pull_request) Has been skipped
Remote Deployment Pipeline / Deploy (Production) (pull_request) Has been skipped
2025-12-20 14:18:08 +01:00
92b98879f8 fix(traefik): allow acme bypass and set high priority for whoami
All checks were successful
Remote Deployment Pipeline / Prepare Context (pull_request) Successful in 2s
Remote Deployment Pipeline / Deploy (Staging) (pull_request) Has been skipped
Remote Deployment Pipeline / Deploy (Dev/Preview) (pull_request) Successful in 48s
Remote Deployment Pipeline / Deploy (Production) (pull_request) Has been skipped
Remote Deployment Pipeline / Cleanup Preview (pull_request) Has been skipped
2025-12-19 22:59:49 +01:00
4e3aa30c61 Force recreation again
All checks were successful
Remote Deployment Pipeline / Prepare Context (pull_request) Successful in 3s
Remote Deployment Pipeline / Deploy (Staging) (pull_request) Has been skipped
Remote Deployment Pipeline / Deploy (Dev/Preview) (pull_request) Successful in 47s
Remote Deployment Pipeline / Cleanup Preview (pull_request) Has been skipped
Remote Deployment Pipeline / Deploy (Production) (pull_request) Has been skipped
2025-12-19 22:42:10 +01:00
bae8f8ffa4 Trying this out
All checks were successful
Remote Deployment Pipeline / Prepare Context (pull_request) Successful in 3s
Remote Deployment Pipeline / Deploy (Staging) (pull_request) Has been skipped
Remote Deployment Pipeline / Deploy (Dev/Preview) (pull_request) Successful in 46s
Remote Deployment Pipeline / Cleanup Preview (pull_request) Has been skipped
Remote Deployment Pipeline / Deploy (Production) (pull_request) Has been skipped
2025-12-19 22:40:44 +01:00
bf04f5645c Added router
All checks were successful
Remote Deployment Pipeline / Prepare Context (pull_request) Successful in 2s
Remote Deployment Pipeline / Deploy (Staging) (pull_request) Has been skipped
Remote Deployment Pipeline / Deploy (Dev/Preview) (pull_request) Successful in 49s
Remote Deployment Pipeline / Cleanup Preview (pull_request) Has been skipped
Remote Deployment Pipeline / Deploy (Production) (pull_request) Has been skipped
2025-12-19 22:27:59 +01:00
2069278f35 Force recreate
All checks were successful
Remote Deployment Pipeline / Prepare Context (pull_request) Successful in 3s
Remote Deployment Pipeline / Deploy (Staging) (pull_request) Has been skipped
Remote Deployment Pipeline / Deploy (Dev/Preview) (pull_request) Successful in 48s
Remote Deployment Pipeline / Deploy (Production) (pull_request) Has been skipped
Remote Deployment Pipeline / Cleanup Preview (pull_request) Has been skipped
2025-12-19 22:20:14 +01:00
e333ed38a0 Testing thsi out
All checks were successful
Remote Deployment Pipeline / Prepare Context (pull_request) Successful in 2s
Remote Deployment Pipeline / Deploy (Staging) (pull_request) Has been skipped
Remote Deployment Pipeline / Deploy (Dev/Preview) (pull_request) Successful in 46s
Remote Deployment Pipeline / Deploy (Production) (pull_request) Has been skipped
Remote Deployment Pipeline / Cleanup Preview (pull_request) Has been skipped
2025-12-19 22:18:45 +01:00
25218446a6 Testing this
All checks were successful
Remote Deployment Pipeline / Prepare Context (pull_request) Successful in 2s
Remote Deployment Pipeline / Deploy (Staging) (pull_request) Has been skipped
Remote Deployment Pipeline / Deploy (Dev/Preview) (pull_request) Successful in 49s
Remote Deployment Pipeline / Cleanup Preview (pull_request) Has been skipped
Remote Deployment Pipeline / Deploy (Production) (pull_request) Has been skipped
2025-12-19 22:10:53 +01:00
959669dc66 Trying this out
All checks were successful
Remote Deployment Pipeline / Prepare Context (pull_request) Successful in 2s
Remote Deployment Pipeline / Deploy (Staging) (pull_request) Has been skipped
Remote Deployment Pipeline / Deploy (Dev/Preview) (pull_request) Successful in 48s
Remote Deployment Pipeline / Cleanup Preview (pull_request) Has been skipped
Remote Deployment Pipeline / Deploy (Production) (pull_request) Has been skipped
2025-12-19 21:57:31 +01:00
076550be7b Checking this out
All checks were successful
Remote Deployment Pipeline / Prepare Context (pull_request) Successful in 2s
Remote Deployment Pipeline / Deploy (Staging) (pull_request) Has been skipped
Remote Deployment Pipeline / Deploy (Dev/Preview) (pull_request) Successful in 48s
Remote Deployment Pipeline / Cleanup Preview (pull_request) Has been skipped
Remote Deployment Pipeline / Deploy (Production) (pull_request) Has been skipped
2025-12-19 21:47:02 +01:00
a4fab170fa Elvileg még nem jó
All checks were successful
Remote Deployment Pipeline / Prepare Context (pull_request) Successful in 3s
Remote Deployment Pipeline / Deploy (Staging) (pull_request) Has been skipped
Remote Deployment Pipeline / Deploy (Dev/Preview) (pull_request) Successful in 49s
Remote Deployment Pipeline / Cleanup Preview (pull_request) Has been skipped
Remote Deployment Pipeline / Deploy (Production) (pull_request) Has been skipped
2025-12-19 21:44:05 +01:00
45f0008eda Try this
All checks were successful
Remote Deployment Pipeline / Prepare Context (pull_request) Successful in 3s
Remote Deployment Pipeline / Deploy (Staging) (pull_request) Has been skipped
Remote Deployment Pipeline / Deploy (Dev/Preview) (pull_request) Successful in 47s
Remote Deployment Pipeline / Cleanup Preview (pull_request) Has been skipped
Remote Deployment Pipeline / Deploy (Production) (pull_request) Has been skipped
2025-12-19 21:30:30 +01:00
9cefaffaba Trying this
All checks were successful
Remote Deployment Pipeline / Prepare Context (pull_request) Successful in 2s
Remote Deployment Pipeline / Deploy (Staging) (pull_request) Has been skipped
Remote Deployment Pipeline / Deploy (Dev/Preview) (pull_request) Successful in 49s
Remote Deployment Pipeline / Cleanup Preview (pull_request) Has been skipped
Remote Deployment Pipeline / Deploy (Production) (pull_request) Has been skipped
2025-12-19 21:27:29 +01:00
4b2cfc142f Trying this out
All checks were successful
Remote Deployment Pipeline / Prepare Context (pull_request) Successful in 3s
Remote Deployment Pipeline / Deploy (Staging) (pull_request) Has been skipped
Remote Deployment Pipeline / Deploy (Dev/Preview) (pull_request) Successful in 48s
Remote Deployment Pipeline / Cleanup Preview (pull_request) Has been skipped
Remote Deployment Pipeline / Deploy (Production) (pull_request) Has been skipped
2025-12-19 21:16:49 +01:00
ae514479d1 Trying this
All checks were successful
Remote Deployment Pipeline / Prepare Context (pull_request) Successful in 2s
Remote Deployment Pipeline / Deploy (Staging) (pull_request) Has been skipped
Remote Deployment Pipeline / Deploy (Dev/Preview) (pull_request) Successful in 51s
Remote Deployment Pipeline / Cleanup Preview (pull_request) Has been skipped
Remote Deployment Pipeline / Deploy (Production) (pull_request) Has been skipped
2025-12-19 21:08:15 +01:00
2a5e27896d Trying new config
All checks were successful
Remote Deployment Pipeline / Prepare Context (pull_request) Successful in 3s
Remote Deployment Pipeline / Deploy (Staging) (pull_request) Has been skipped
Remote Deployment Pipeline / Deploy (Dev/Preview) (pull_request) Successful in 51s
Remote Deployment Pipeline / Cleanup Preview (pull_request) Has been skipped
Remote Deployment Pipeline / Deploy (Production) (pull_request) Has been skipped
2025-12-19 21:04:58 +01:00
a63d3c93c7 Redo stuff
All checks were successful
Remote Deployment Pipeline / Prepare Context (pull_request) Successful in 3s
Remote Deployment Pipeline / Deploy (Staging) (pull_request) Has been skipped
Remote Deployment Pipeline / Deploy (Dev/Preview) (pull_request) Successful in 47s
Remote Deployment Pipeline / Cleanup Preview (pull_request) Has been skipped
Remote Deployment Pipeline / Deploy (Production) (pull_request) Has been skipped
2025-12-19 21:00:18 +01:00
324177e357 Small changes
All checks were successful
Remote Deployment Pipeline / Prepare Context (pull_request) Successful in 3s
Remote Deployment Pipeline / Deploy (Staging) (pull_request) Has been skipped
Remote Deployment Pipeline / Deploy (Dev/Preview) (pull_request) Successful in 48s
Remote Deployment Pipeline / Deploy (Production) (pull_request) Has been skipped
Remote Deployment Pipeline / Cleanup Preview (pull_request) Has been skipped
2025-12-19 20:50:38 +01:00
65f7a680f4 Uncommented certificateresolver
All checks were successful
Remote Deployment Pipeline / Prepare Context (pull_request) Successful in 2s
Remote Deployment Pipeline / Deploy (Staging) (pull_request) Has been skipped
Remote Deployment Pipeline / Deploy (Dev/Preview) (pull_request) Successful in 49s
Remote Deployment Pipeline / Deploy (Production) (pull_request) Has been skipped
Remote Deployment Pipeline / Cleanup Preview (pull_request) Has been skipped
2025-12-19 20:43:55 +01:00
51cb58e185 Fix entrypoint
All checks were successful
Remote Deployment Pipeline / Prepare Context (pull_request) Successful in 3s
Remote Deployment Pipeline / Deploy (Staging) (pull_request) Has been skipped
Remote Deployment Pipeline / Deploy (Dev/Preview) (pull_request) Successful in 48s
Remote Deployment Pipeline / Deploy (Production) (pull_request) Has been skipped
Remote Deployment Pipeline / Cleanup Preview (pull_request) Has been skipped
2025-12-19 20:40:48 +01:00
a370df9f82 Unified config
All checks were successful
Remote Deployment Pipeline / Prepare Context (pull_request) Successful in 2s
Remote Deployment Pipeline / Deploy (Staging) (pull_request) Has been skipped
Remote Deployment Pipeline / Deploy (Dev/Preview) (pull_request) Successful in 50s
Remote Deployment Pipeline / Cleanup Preview (pull_request) Has been skipped
Remote Deployment Pipeline / Deploy (Production) (pull_request) Has been skipped
2025-12-19 20:37:08 +01:00
095267f415 Fix entrypoints
All checks were successful
Remote Deployment Pipeline / Prepare Context (pull_request) Successful in 2s
Remote Deployment Pipeline / Deploy (Staging) (pull_request) Has been skipped
Remote Deployment Pipeline / Deploy (Dev/Preview) (pull_request) Successful in 1m18s
Remote Deployment Pipeline / Cleanup Preview (pull_request) Has been skipped
Remote Deployment Pipeline / Deploy (Production) (pull_request) Has been skipped
2025-12-19 20:33:39 +01:00
2795ca9465 Removed certificateresolver
All checks were successful
Remote Deployment Pipeline / Prepare Context (pull_request) Successful in 2s
Remote Deployment Pipeline / Deploy (Staging) (pull_request) Has been skipped
Remote Deployment Pipeline / Deploy (Dev/Preview) (pull_request) Successful in 50s
Remote Deployment Pipeline / Deploy (Production) (pull_request) Has been skipped
Remote Deployment Pipeline / Cleanup Preview (pull_request) Has been skipped
2025-12-19 20:25:51 +01:00
3ac0b17699 Moved certificateResolver
All checks were successful
Remote Deployment Pipeline / Prepare Context (pull_request) Successful in 2s
Remote Deployment Pipeline / Deploy (Staging) (pull_request) Has been skipped
Remote Deployment Pipeline / Deploy (Dev/Preview) (pull_request) Successful in 46s
Remote Deployment Pipeline / Cleanup Preview (pull_request) Has been skipped
Remote Deployment Pipeline / Deploy (Production) (pull_request) Has been skipped
2025-12-19 20:23:06 +01:00
e039bfed6d Trying this config
All checks were successful
Remote Deployment Pipeline / Prepare Context (pull_request) Successful in 2s
Remote Deployment Pipeline / Deploy (Staging) (pull_request) Has been skipped
Remote Deployment Pipeline / Deploy (Dev/Preview) (pull_request) Successful in 46s
Remote Deployment Pipeline / Cleanup Preview (pull_request) Has been skipped
Remote Deployment Pipeline / Deploy (Production) (pull_request) Has been skipped
2025-12-19 20:17:36 +01:00
799cf8c341 Merge branch 'main' into fix-acme
All checks were successful
Remote Deployment Pipeline / Prepare Context (pull_request) Successful in 3s
Remote Deployment Pipeline / Deploy (Staging) (pull_request) Has been skipped
Remote Deployment Pipeline / Deploy (Production) (pull_request) Has been skipped
Remote Deployment Pipeline / Cleanup Preview (pull_request) Has been skipped
Remote Deployment Pipeline / Deploy (Dev/Preview) (pull_request) Successful in 49s
2025-12-19 19:55:57 +01:00
860f4333e1 Testing new config
All checks were successful
Remote Deployment Pipeline / Prepare Context (pull_request) Successful in 2s
Remote Deployment Pipeline / Deploy (Staging) (pull_request) Has been skipped
Remote Deployment Pipeline / Deploy (Dev/Preview) (pull_request) Successful in 46s
Remote Deployment Pipeline / Cleanup Preview (pull_request) Has been skipped
Remote Deployment Pipeline / Deploy (Production) (pull_request) Has been skipped
2025-12-19 19:53:51 +01:00
5d5d7e783a Setup env
All checks were successful
Remote Deployment Pipeline / Prepare Context (pull_request) Successful in 3s
Remote Deployment Pipeline / Deploy (Staging) (pull_request) Has been skipped
Remote Deployment Pipeline / Deploy (Dev/Preview) (pull_request) Successful in 48s
Remote Deployment Pipeline / Deploy (Production) (pull_request) Has been skipped
Remote Deployment Pipeline / Cleanup Preview (pull_request) Has been skipped
2025-12-19 19:36:05 +01:00
16 changed files with 67 additions and 424 deletions

View File

@@ -46,7 +46,7 @@ jobs:
needs: [prepare_context] needs: [prepare_context]
if: github.event_name == 'pull_request' && github.event.action != 'closed' if: github.event_name == 'pull_request' && github.event.action != 'closed'
steps: steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- name: Deploy via Rsync & Docker - name: Deploy via Rsync & Docker
uses: easingthemes/ssh-deploy@a1aa0b6cf96ce2406eef90faa35007a4a7bf0ac0 # v5.1.1 uses: easingthemes/ssh-deploy@a1aa0b6cf96ce2406eef90faa35007a4a7bf0ac0 # v5.1.1
@@ -65,7 +65,7 @@ jobs:
SCRIPT_AFTER: | SCRIPT_AFTER: |
set -e set -e
cd ${{ needs.prepare_context.outputs.pr_path }} cd ${{ needs.prepare_context.outputs.pr_path }}
docker compose --env-file dev.env -f docker-compose.yaml up -d --build --remove-orphans --wait docker compose --env-file dev.env -f docker-compose.yaml up -d --build --remove-orphans
# ------------------------------------------------------------------ # ------------------------------------------------------------------
# STAGE 3: DEPLOY STAGING # STAGE 3: DEPLOY STAGING
@@ -75,7 +75,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' if: github.ref == 'refs/heads/main'
steps: steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- name: Deploy via Rsync & Docker - name: Deploy via Rsync & Docker
uses: easingthemes/ssh-deploy@a1aa0b6cf96ce2406eef90faa35007a4a7bf0ac0 # v5.1.1 uses: easingthemes/ssh-deploy@a1aa0b6cf96ce2406eef90faa35007a4a7bf0ac0 # v5.1.1
@@ -91,7 +91,7 @@ jobs:
SCRIPT_AFTER: | SCRIPT_AFTER: |
set -e set -e
cd ${{ env.REMOTE_STAGING_PATH }} cd ${{ env.REMOTE_STAGING_PATH }}
docker compose --env-file staging.env -f docker-compose.yaml up -d --build --remove-orphans --wait docker compose --env-file staging.env -f docker-compose.yaml up -d --build --remove-orphans
# ------------------------------------------------------------------ # ------------------------------------------------------------------
# STAGE 4: DEPLOY PRODUCTION # STAGE 4: DEPLOY PRODUCTION
@@ -102,7 +102,7 @@ jobs:
needs: [deploy_staging] needs: [deploy_staging]
if: github.ref == 'refs/heads/main' if: github.ref == 'refs/heads/main'
steps: steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- name: Deploy via Rsync & Docker - name: Deploy via Rsync & Docker
uses: easingthemes/ssh-deploy@a1aa0b6cf96ce2406eef90faa35007a4a7bf0ac0 # v5.1.1 uses: easingthemes/ssh-deploy@a1aa0b6cf96ce2406eef90faa35007a4a7bf0ac0 # v5.1.1
@@ -118,16 +118,7 @@ jobs:
SCRIPT_AFTER: | SCRIPT_AFTER: |
set -e set -e
cd ${{ env.REMOTE_PROD_PATH }} cd ${{ env.REMOTE_PROD_PATH }}
docker compose --env-file prod.env -f docker-compose.yaml -f docker-compose.prod.yaml up -d --build --remove-orphans --wait docker compose --env-file prod.env -f docker-compose.yaml -f docker-compose.prod.yaml up -d --build --remove-orphans
# Run E2E Tests
echo "Running E2E tests..."
export CI=true
# Create venv to avoid polluting system python
python3 -m venv .venv
. .venv/bin/activate
pip install -r tests/e2e/requirements.txt
pytest tests/e2e/
# ------------------------------------------------------------------ # ------------------------------------------------------------------
# CLEANUP (Using appleboy/ssh-action for pure command execution) # CLEANUP (Using appleboy/ssh-action for pure command execution)
@@ -139,7 +130,7 @@ jobs:
if: github.event_name == 'pull_request' && (github.event.action == 'closed' || github.event.pull_request.merged == true) if: github.event_name == 'pull_request' && (github.event.action == 'closed' || github.event.pull_request.merged == true)
steps: steps:
- name: Remove Remote Environment - name: Remove Remote Environment
uses: appleboy/ssh-action@0ff4204d59e8e51228ff73bce53f80d53301dee2 # v1.2.5 uses: appleboy/ssh-action@823bd89e131d8d508129f9443cad5855e9ba96f0 # v1.2.4
with: with:
host: ${{ env.SSH_HOST }} host: ${{ env.SSH_HOST }}
username: ${{ env.SSH_USER }} username: ${{ env.SSH_USER }}

View File

@@ -4,6 +4,4 @@ ENV=dev
NETWORK_NAME=proxy NETWORK_NAME=proxy
CERTBOT_CA_RESOLVER=https://acme-staging-v02.api.letsencrypt.org/directory CERTBOT_CA_RESOLVER=https://acme-staging-v02.api.letsencrypt.org/directory
DOMAIN=dev.kovagoadi.hu DOMAIN=dev.kovagoadi.hu
ACME_BYPASS=false TRAEFIK_LEGACY_OPT="--providers.file.filename=/etc/traefik/forward-to-legacy-nginx.yaml"
TRAEFIK_LEGACY_OPT=
# TRAEFIK_LEGACY_OPT="--providers.file.directory=/etc/traefik"

View File

@@ -0,0 +1,45 @@
# ./traefik/forward-to-legacy-nginx.yaml
tcp:
routers:
# Router for LEGACY HTTPS (Passthrough)
nginx-legacy-router-secure:
# DO NOT use "*". List the domains that Nginx manages itself.
# If you use "*", Traefik's own HTTPS domains will not work.
rule: "HostSNI(`excali.kovagoadi.hu`) || HostSNI(`another-legacy.hu`)"
service: nginx-legacy-service-secure
tls:
passthrough: true
priority: 10
entryPoints:
- "https"
services:
nginx-legacy-service-secure:
loadBalancer:
servers:
- address: "webserver:443"
http:
routers:
# 1. TRAEFIK-MANAGED ACME HANDLER (Removed manual router)
traefik-acme-handler:
rule: "Host(`test-whoami.dev.kovagoadi.hu`) && PathPrefix(`/.well-known/acme-challenge/`)"
entryPoints:
- "web"
service: "acme-http@internal" # This is the internal service name
priority: 1000 # High priority to ensure it wins
# 2. THE HTTP CATCH-ALL (Sends other ACME and HTTP to Nginx)
nginx-legacy-router:
rule: "HostRegexp(`^.+$`)"
service: nginx-legacy-service
entryPoints:
- "web"
priority: 90
services:
nginx-legacy-service:
loadBalancer:
servers:
- url: "http://webserver:80"

View File

@@ -1,11 +1,12 @@
services: services:
traefik: traefik9:
image: "traefik:v3.6@sha256:a9890c898f379c1905ee5b28342f6b408dc863f08db2dab20e46c267d1ff463a" image: "traefik:v3.6@sha256:67622638cd88dbfcfba40159bc652ecf0aea0e032f8a3c7e3134ae7c037b9910"
restart: unless-stopped restart: unless-stopped
security_opt: security_opt:
- no-new-privileges:true - no-new-privileges:true
networks: networks:
- proxy - proxy
- legacy-nginx
command: command:
- "--providers.docker=true" - "--providers.docker=true"
- "--providers.docker.exposedbydefault=false" - "--providers.docker.exposedbydefault=false"
@@ -13,7 +14,7 @@ services:
- "--providers.docker.constraints=Label(`env`, `${ENV}`)" - "--providers.docker.constraints=Label(`env`, `${ENV}`)"
- "--entryPoints.web.address=:80" - "--entryPoints.web.address=:80"
- "--entryPoints.https.address=:443" - "--entryPoints.https.address=:443"
- "--entryPoints.web.allowACMEByPass=${ACME_BYPASS}" - "--entryPoints.web.allowACMEByPass=true"
- "--certificatesresolvers.letsencrypt.acme.httpchallenge=true" - "--certificatesresolvers.letsencrypt.acme.httpchallenge=true"
- "--certificatesresolvers.letsencrypt.acme.httpchallenge.entrypoint=web" - "--certificatesresolvers.letsencrypt.acme.httpchallenge.entrypoint=web"
- "--certificatesresolvers.letsencrypt.acme.email=kovagoadi@gmail.com" - "--certificatesresolvers.letsencrypt.acme.email=kovagoadi@gmail.com"
@@ -21,9 +22,6 @@ services:
- "--certificatesResolvers.letsencrypt.acme.caServer=${CERTBOT_CA_RESOLVER}" - "--certificatesResolvers.letsencrypt.acme.caServer=${CERTBOT_CA_RESOLVER}"
- "${TRAEFIK_LEGACY_OPT:-}" - "${TRAEFIK_LEGACY_OPT:-}"
- "--providers.file.watch=true" - "--providers.file.watch=true"
# extra_hosts:
# - "staging:${STAGING_IP:-192.168.1.85}"
# - "webserver:${LEGACY_IP:-192.168.1.85}"
ports: ports:
- "${PORT}:80" - "${PORT}:80"
- "${HTTPS_PORT}:443" - "${HTTPS_PORT}:443"
@@ -31,7 +29,7 @@ services:
volumes: volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro" - "/var/run/docker.sock:/var/run/docker.sock:ro"
- "letsencrypt:/letsencrypt" - "letsencrypt:/letsencrypt"
- "./${ENV}:/etc/traefik" - "./${ENV}/forward-to-legacy-nginx.yaml:/etc/traefik/forward-to-legacy-nginx.yaml"
whoami: whoami:
image: "traefik/whoami@sha256:200689790a0a0ea48ca45992e0450bc26ccab5307375b41c84dfc4f2475937ab" image: "traefik/whoami@sha256:200689790a0a0ea48ca45992e0450bc26ccab5307375b41c84dfc4f2475937ab"
@@ -51,5 +49,8 @@ services:
- traefik.http.routers.https.tls.certresolver=letsencrypt - traefik.http.routers.https.tls.certresolver=letsencrypt
networks: networks:
proxy: proxy:
legacy-nginx:
name: proxy
external: true
volumes: volumes:
letsencrypt: letsencrypt:

View File

@@ -4,5 +4,4 @@ ENV=prod
NETWORK_NAME=proxy NETWORK_NAME=proxy
CERTBOT_CA_RESOLVER=https://acme-v02.api.letsencrypt.org/directory CERTBOT_CA_RESOLVER=https://acme-v02.api.letsencrypt.org/directory
DOMAIN=kovagoadi.hu DOMAIN=kovagoadi.hu
ACME_BYPASS=true TRAEFIK_LEGACY_OPT="--providers.file.filename=/etc/traefik/forward-to-legacy-nginx.yaml"
TRAEFIK_LEGACY_OPT="--providers.file.directory=/etc/traefik"

View File

@@ -9,7 +9,7 @@ tcp:
# Passthrough must be true for SSL to reach Nginx encrypted # Passthrough must be true for SSL to reach Nginx encrypted
tls: tls:
passthrough: true passthrough: true
priority: 10 priority: 1
entryPoints: entryPoints:
- "https" - "https"
@@ -23,20 +23,12 @@ tcp:
http: http:
routers: routers:
# 1. TRAEFIK-MANAGED ACME HANDLER (Removed manual router) # Router for HTTP
traefik-acme-handler:
rule: "Host(`test-whoami.kovagoadi.hu`) && PathPrefix(`/.well-known/acme-challenge/`)"
entryPoints:
- "web"
service: "acme-http@internal" # This is the internal service name
priority: 1000 # High priority to ensure it wins
# 2. THE HTTP CATCH-ALL (Sends other ACME and HTTP to Nginx)
nginx-legacy-router: nginx-legacy-router:
rule: "HostRegexp(`^.+$`)" rule: "HostRegexp(`^.+$`)"
service: nginx-legacy-service service: nginx-legacy-service
# Low priority ensures specific containers are handled first, but before the default acme-handler # Low priority ensures specific containers are handled first
priority: 90 priority: 1
entryPoints: entryPoints:
- "web" - "web"

View File

@@ -1,33 +0,0 @@
http:
routers:
# Router for HTTP (Port 80)
staging:
rule: "HostRegexp(`^.+\\.staging\\.kovagoadi\\.hu$`) || HostRegexp(`^.+\\.dev\\.kovagoadi\\.hu$`)"
entryPoints:
- "web"
service: "dev-staging"
priority: 1000
services:
dev-staging:
loadBalancer:
servers:
- url: "http://staging:8080"
tcp:
routers:
# Router for HTTPS (Passthrough)
dev-staging-secure:
rule: "HostSNIRegexp(`^.+\\.staging\\.kovagoadi\\.hu$`) || HostSNIRegexp(`^.+\\.dev\\.kovagoadi\\.hu$`)"
service: "dev-staging-secure"
# Passthrough must be true for SSL to reach Nginx encrypted
tls:
passthrough: true
priority: 1000
entryPoints:
- "https"
services:
dev-staging-secure:
loadBalancer:
servers:
# Note: Ensure Traefik trusts the cert at .85 or set insecureSkipVerify
- address: "staging:445"

View File

@@ -4,5 +4,4 @@ ENV=staging
NETWORK_NAME=proxy NETWORK_NAME=proxy
CERTBOT_CA_RESOLVER=https://acme-staging-v02.api.letsencrypt.org/directory CERTBOT_CA_RESOLVER=https://acme-staging-v02.api.letsencrypt.org/directory
DOMAIN=staging.kovagoadi.hu DOMAIN=staging.kovagoadi.hu
ACME_BYPASS=false
TRAEFIK_LEGACY_OPT= TRAEFIK_LEGACY_OPT=

View File

@@ -1 +0,0 @@
__pycache__

View File

@@ -1,2 +0,0 @@
pytest
requests

View File

@@ -1,221 +0,0 @@
import pytest
import requests
import os
# Configuration
DOMAIN = os.getenv("DOMAIN", "dev.kovagoadi.hu")
PORT = os.getenv("PORT", "898")
HTTPS_PORT = os.getenv("HTTPS_PORT", "446")
BASE_URL = f"http://127.0.0.1:{PORT}"
HTTPS_BASE_URL = f"https://127.0.0.1:{HTTPS_PORT}"
HOST_HEADER = f"test-whoami.{DOMAIN}"
@pytest.fixture(scope="session", autouse=True)
def mock_webserver():
"""Start ephemeral mock webserver containers and configure Traefik."""
import time
# Skip ephemeral mocks in CI environment; test against real services
if os.getenv("CI"):
print("CI environment detected. Skipping ephemeral mock setup; testing against real services.")
yield
return
# In CI (Docker-in-Docker), we need to use the HOST path for volumes, not the container path.
# The workflow mounts the project root to /app, but the Docker daemon is on the host.
# We pass PROJECT_ROOT env var to the test container to tell it where the files are on the HOST.
cwd = os.getenv("PROJECT_ROOT", os.getcwd())
certs_dir = os.path.join(cwd, "tests/mock_nginx/certs")
image = "nginx:alpine"
# Define mocks
mocks = [
{
"name": "mock-legacy-ephemeral",
"alias": "webserver",
"conf": os.path.join(cwd, "tests/mock_nginx/legacy.conf"),
"ports": ["80", "443"]
},
{
"name": "mock-staging-ephemeral",
"alias": "mock",
"conf": os.path.join(cwd, "tests/mock_nginx/staging.conf"),
"ports": ["8080", "445"]
}
]
# Cleanup and Start Mocks
mock_ips = {}
for mock in mocks:
subprocess.run(["docker", "rm", "-f", mock["name"]], capture_output=True)
cmd = [
"docker", "run", "-d", "--rm",
"--name", mock["name"],
"--network", "proxy",
"--network-alias", mock["alias"],
"-v", f"{mock['conf']}:/etc/nginx/nginx.conf:ro",
"-v", f"{certs_dir}:/etc/nginx/certs:ro",
image
]
print(f"Starting {mock['name']}...")
result = subprocess.run(cmd, capture_output=True, text=True)
if result.returncode != 0:
print(f"STDOUT: {result.stdout}")
print(f"STDERR: {result.stderr}")
pytest.fail(f"Failed to start {mock['name']}: {result.stderr}")
# Inspect container to get IP
inspect_cmd = ["docker", "inspect", "-f", "{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}", mock["name"]]
inspect_res = subprocess.run(inspect_cmd, capture_output=True, text=True)
if inspect_res.returncode != 0:
pytest.fail(f"Failed to inspect {mock['name']}: {inspect_res.stderr}")
mock_ips[mock["alias"]] = inspect_res.stdout.strip()
print(f"{mock['name']} IP: {mock_ips[mock['alias']]}")
# Restart Traefik with IP env vars for extra_hosts
print(f"Restarting Traefik with STAGING_IP={mock_ips['mock']} and LEGACY_IP={mock_ips['webserver']}...")
env = os.environ.copy()
env["STAGING_IP"] = mock_ips["mock"]
env["LEGACY_IP"] = mock_ips["webserver"]
# In CI (Docker-in-Docker), we need to tell docker-compose that the project root
# is the HOST path (PROJECT_ROOT), not the container path (/app).
# This ensures volume mounts use the correct host paths.
if "PROJECT_ROOT" in os.environ:
env["COMPOSE_PROJECT_DIR"] = os.environ["PROJECT_ROOT"]
# We need to recreate the container to pick up extra_hosts changes
try:
subprocess.run(["docker-compose", "--env-file", "dev.env", "up", "-d", "--force-recreate", "--no-deps", "traefik"], env=env, check=True, capture_output=True, text=True)
except subprocess.CalledProcessError as e:
print(f"Docker Compose STDOUT: {e.stdout}")
print(f"Docker Compose STDERR: {e.stderr}")
raise e
# Wait for everything to settle
time.sleep(5)
yield
print("Stopping mocks and restoring Traefik...")
for mock in mocks:
subprocess.run(["docker", "stop", mock["name"]], capture_output=True)
# Restore Traefik to default (optional)
subprocess.run(["docker-compose", "--env-file", "dev.env", "up", "-d", "--force-recreate", "--no-deps", "traefik"], check=True)
def test_whoami_http_reachable():
"""Verify that the whoami service is reachable via HTTP."""
try:
response = requests.get(BASE_URL, headers={"Host": HOST_HEADER}, timeout=5)
assert response.status_code == 200
assert "Hostname:" in response.text
except requests.exceptions.RequestException as e:
pytest.fail(f"Failed to connect to {BASE_URL}: {e}")
import subprocess
def test_whoami_https_reachable():
"""Verify that the whoami service is reachable via HTTPS using curl (to handle SNI/DNS)."""
# We use curl because requests doesn't support --resolve easily to force SNI with custom IP
cmd = [
"curl", "-s", "-k", "--fail",
"--resolve", f"{HOST_HEADER}:{HTTPS_PORT}:127.0.0.1",
f"https://{HOST_HEADER}:{HTTPS_PORT}"
]
try:
result = subprocess.run(cmd, capture_output=True, text=True, timeout=10, check=True)
assert result.returncode == 0
except subprocess.CalledProcessError as e:
pytest.fail(f"Curl failed with exit code {e.returncode}: {e.stderr}")
except subprocess.TimeoutExpired:
pytest.fail("Curl timed out")
def test_https_redirect():
"""Verify that HTTP requests are NOT redirected to HTTPS (based on config, or check if they SHOULD be)."""
# Based on docker-compose, there is no global redirect middleware configured on the entrypoint.
# So HTTP should remain HTTP.
try:
response = requests.get(BASE_URL, headers={"Host": HOST_HEADER}, allow_redirects=False, timeout=5)
assert response.status_code == 200
except requests.exceptions.RequestException as e:
pytest.fail(f"Failed to connect to {BASE_URL}: {e}")
def test_unknown_host_404():
"""Verify that requests to an unknown host (hitting legacy-nginx catch-all) are routed to the mock."""
try:
# We use a domain that doesn't match the specific *.dev.kovagoadi.hu rules
# so it falls through to the catch-all 'nginx-legacy-router'
response = requests.get(BASE_URL + "/login", headers={"Host": "tar.kovagoadi.hu"}, timeout=5)
assert response.status_code == 200
except requests.exceptions.RequestException as e:
pytest.fail(f"Failed to connect to {BASE_URL}: {e}")
def test_unknown_host_https_passthrough():
"""Verify that HTTPS requests to an unknown host are passed through to the mock Nginx."""
# We use curl to handle SNI and self-signed certs
# unknown.com should hit the catch-all SNI router
cmd = [
"curl", "-s", "-k", "-i", "--fail",
"--resolve", f"tar.kovagoadi.hu:{HTTPS_PORT}:127.0.0.1",
f"https://tar.kovagoadi.hu:{HTTPS_PORT}/login"
]
try:
result = subprocess.run(cmd, capture_output=True, text=True, timeout=10, check=True)
assert result.returncode == 0
except subprocess.CalledProcessError as e:
pytest.fail(f"Curl failed with exit code {e.returncode}: {e.stderr}")
except subprocess.TimeoutExpired:
pytest.fail("Curl timed out")
def test_staging_http_routing():
"""Verify HTTP requests to *.staging.kovagoadi.hu are routed to the mock."""
host = "test-whoami.staging.kovagoadi.hu"
try:
response = requests.get(BASE_URL, headers={"Host": host}, timeout=5)
assert response.status_code == 200
except requests.exceptions.RequestException as e:
pytest.fail(f"Failed to connect to {BASE_URL} with host {host}: {e}")
def test_dev_http_routing():
"""Verify HTTP requests to *.dev.kovagoadi.hu are routed to the mock."""
host = "test-whoami.dev.kovagoadi.hu"
try:
response = requests.get(BASE_URL, headers={"Host": host}, timeout=5)
assert response.status_code == 200
except requests.exceptions.RequestException as e:
pytest.fail(f"Failed to connect to {BASE_URL} with host {host}: {e}")
def test_staging_https_routing():
"""Verify HTTPS requests to *.staging.kovagoadi.hu are routed to the mock."""
host = "test-whoami.staging.kovagoadi.hu"
cmd = [
"curl", "-s", "-k", "-i", "--fail",
"--resolve", f"{host}:{HTTPS_PORT}:127.0.0.1",
f"https://{host}:{HTTPS_PORT}"
]
try:
result = subprocess.run(cmd, capture_output=True, text=True, timeout=10, check=True)
assert result.returncode == 0
except subprocess.CalledProcessError as e:
pytest.fail(f"Curl failed with exit code {e.returncode}: {e.stderr}")
except subprocess.TimeoutExpired:
pytest.fail("Curl timed out")
def test_dev_https_routing():
"""Verify HTTPS requests to *.dev.kovagoadi.hu are routed to the mock."""
host = "test-whoami.dev.kovagoadi.hu"
cmd = [
"curl", "-s", "-k", "-i", "--fail",
"--resolve", f"{host}:{HTTPS_PORT}:127.0.0.1",
f"https://{host}:{HTTPS_PORT}"
]
try:
result = subprocess.run(cmd, capture_output=True, text=True, timeout=10, check=True)
assert result.returncode == 0
except subprocess.CalledProcessError as e:
pytest.fail(f"Curl failed with exit code {e.returncode}: {e.stderr}")
except subprocess.TimeoutExpired:
pytest.fail("Curl timed out")

View File

@@ -1,19 +0,0 @@
-----BEGIN CERTIFICATE-----
MIIDCzCCAfOgAwIBAgIUU5vuywVWaoDfFyee7NCy0BqXU3kwDQYJKoZIhvcNAQEL
BQAwFTETMBEGA1UEAwwKbW9jay1uZ2lueDAeFw0yNTEyMjUxNjAwMTNaFw0yNjEy
MjUxNjAwMTNaMBUxEzARBgNVBAMMCm1vY2stbmdpbngwggEiMA0GCSqGSIb3DQEB
AQUAA4IBDwAwggEKAoIBAQCaoLrs78+HbDFB/HsXTy5nqtP7V33Js0GDWxk6QkOq
qbCtd5e2fzjkFFWkFIuouLEL1+4xW5txToaCtIYhQUgwST/Wu4wLlzrueRmprTh2
oTLbpSVXn6kO7dvDinsfelcjnLNgjRkkKPRYVvnCsrr2O9gFhClWf+WKMuNP99/O
4Y7Na4l6fyQAMjDSgdFjVvB+D9YMbkfNmo5hs009lF0Y6u35hIaY1NyfI+csvwWZ
j75I/1TGKQGwrmtG2U31xM8Y8mj7mye0IeXoIg8rl/efYVKRcEBahu0140t6A69g
N7kCSsGhl78VJEUVz5OuOSdV9UDwzawiHh/M+1KE3/3VAgMBAAGjUzBRMB0GA1Ud
DgQWBBQOgMuir6oD712l2GKpUoPo0RUcyDAfBgNVHSMEGDAWgBQOgMuir6oD712l
2GKpUoPo0RUcyDAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQAv
52u9mAOTKStdNZA4R68icJRXmOuxkTh9/rMdOYFF+GM2bMiX1DsvY9/VAFuy7EdZ
yfvu72JyaBDMljryz6doupXm9Do9um2sTU0YKkarV2EECYqt5uC56KWs9XZ9mnYW
wnTrLTbGZhRbGz4pq+Pq7Z1VUexV/Tnoxs5RlOaDxrlaS9htLfIR3dv2bhQiMGN9
1LESNZ16c3s4026pxeojCKFVf2GS+IBdbzljdUzBMVzwGl10UZQHfMDJptuW6JKo
rO5XVp5cLpLzSgUSGtGIoT2dR2Nk5kxGw4VbRCKKD7CDdS+JFypSwdg3v2oNfAmV
op1lOPZtztQRw/6zo4Ex
-----END CERTIFICATE-----

View File

@@ -1,28 +0,0 @@
-----BEGIN PRIVATE KEY-----
MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCaoLrs78+HbDFB
/HsXTy5nqtP7V33Js0GDWxk6QkOqqbCtd5e2fzjkFFWkFIuouLEL1+4xW5txToaC
tIYhQUgwST/Wu4wLlzrueRmprTh2oTLbpSVXn6kO7dvDinsfelcjnLNgjRkkKPRY
VvnCsrr2O9gFhClWf+WKMuNP99/O4Y7Na4l6fyQAMjDSgdFjVvB+D9YMbkfNmo5h
s009lF0Y6u35hIaY1NyfI+csvwWZj75I/1TGKQGwrmtG2U31xM8Y8mj7mye0IeXo
Ig8rl/efYVKRcEBahu0140t6A69gN7kCSsGhl78VJEUVz5OuOSdV9UDwzawiHh/M
+1KE3/3VAgMBAAECggEANx57c5Fqj1IMXwLC2ATEPHUDGpHOB5PMEyhqnj9XwqK5
laRPYuEH5Rmwi4w9Wnf3uIqQ4GxQxTuiLD5wn7MXKgs6Y++31LvkaHSnprnWKkd9
Cxnb7Ve/GlDEqXgYOpjQLiQiNxUk9KRasZDTeElg5vxfHVxGpgxyROit6egokiR8
JNglP+zrHicuvzl4f2DGQmjF5C4HQgyFIVrBv+vNKlqKmg2HatKIqBE60u7uw6CI
/Q8ecqU9oVZscOF9T6hUJX0xijGSsE5UTR87U2zo0+fQRJ5qZ5pLjIuF5YiCi0eT
qZex+h1TuTHNFoc1gcAyj5eDZQwwzZiR/Lae/pDyYwKBgQDVPy/elkUkoDm/OlbE
g+wZpBAGGw2ACCK5SpgwRVmHEZUvBbNZgLfE0BydaK88eDTDbLpvfVNvMoNrZQTh
bAqt9XsFBzmfMusiDYbK3ebhooObEcc6I1GmU5fqHuDv3h0CaEli2JjPmB44mXr8
EGtl98nijNgAmbaA3p7IlWGeGwKBgQC5oPJOjSw6ZRywZwB220tIm0vMcp60sTmq
H+ESaNMkpB38T9OBTdprBjAUzDCZC4jKFwU03ZQtGIN9S6BhogqyP8BRI/+lGJRQ
ZLT1eVSHuC8bX1kVfb5tlahRQ2VUSj5cZxyOiZ8JXa1r1bf8/FZ/0tzLB4a7Ge5Z
2lyQXa3SzwKBgCGCDkmRn0fEDY7o4d17RUw6JXJwKczmel5XRFbBbvH0Z1a+NJJp
0XaRpQ1u96ou0Uur+Bewv72HWHM1qnCpg3wWSMBfhERpwdzV90pFWBQ4bymcv4t5
JUlXdVWKiJnocvJ/5JgtpMVqB8WpCFQ3WEjriMOakg52GOFjGdw27OHlAoGBAKmk
eezpvXK8dySLbXQx4zI+ol38nie6E13zdmixnczNo42zkjKIaMUISaaoGP20+dTe
huaSXVl9HqXCGJdBVI8kDejZgkdqGBkEgBAaSvMhkwNr9ujaGs7hR4rEkfUfSLB/
lyx4fvw7PULgdR3hqld06E0v2qRhBV/eXFufET0nAoGAaXKncm7o2LnMIcJV3qrk
c0darLx+VWg0ILnE3/6kGSgGGnMm93tEwSX8h7Nq7QRNkVLUalVAcjm7jR9XGNsY
W8oXqsyqmntNSA2f9w4MqYO2/i/xtN830qW2nw/RLLV5avD6EkY2KrlFbrrZQr2y
q8oFyEAxJc8Kmo5ocnrPq1s=
-----END PRIVATE KEY-----

View File

@@ -1,26 +0,0 @@
events {}
http {
server {
listen 80;
server_name _;
location / {
add_header X-Mock-Service "legacy";
return 200 "Mock Nginx Legacy HTTP\n";
}
}
server {
listen 443 ssl;
server_name _;
ssl_certificate /etc/nginx/certs/server.crt;
ssl_certificate_key /etc/nginx/certs/server.key;
location / {
add_header X-Mock-Service "legacy";
return 200 "Mock Nginx Legacy HTTPS\n";
}
}
}

View File

@@ -1,26 +0,0 @@
events {}
http {
server {
listen 80;
server_name _;
location / {
add_header X-Mock-Service "true";
return 200 "Mock Nginx HTTP\n";
}
}
server {
listen 443 ssl;
server_name _;
ssl_certificate /etc/nginx/certs/server.crt;
ssl_certificate_key /etc/nginx/certs/server.key;
location / {
add_header X-Mock-Service "true";
return 200 "Mock Nginx HTTPS\n";
}
}
}

View File

@@ -1,26 +0,0 @@
events {}
http {
server {
listen 8080;
server_name _;
location / {
add_header X-Mock-Service "staging";
return 200 "Mock Nginx Staging HTTP\n";
}
}
server {
listen 445 ssl;
server_name _;
ssl_certificate /etc/nginx/certs/server.crt;
ssl_certificate_key /etc/nginx/certs/server.key;
location / {
add_header X-Mock-Service "staging";
return 200 "Mock Nginx Staging HTTPS\n";
}
}
}