Compare commits
18 Commits
10a20a555d
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 8c6c01b916 | |||
| 249f3030c3 | |||
| 5678f43f4c | |||
| 9de4b3a699 | |||
| 83984df467 | |||
| 7e253b5046 | |||
| dd7aeb8f39 | |||
| f9ca764aa3 | |||
| 5d465f75c3 | |||
| 23d99e7a9f | |||
| 0f1770e1c0 | |||
| 7b014c9eb2 | |||
| 29b45882a2 | |||
| 70751a19ff | |||
| a9a3f0b186 | |||
| 707fed06c7 | |||
| 23e65c4014 | |||
| de7c379fe2 |
@@ -46,10 +46,10 @@ 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@v4
|
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
|
||||||
|
|
||||||
- name: Deploy via Rsync & Docker
|
- name: Deploy via Rsync & Docker
|
||||||
uses: easingthemes/ssh-deploy@v5.0.0
|
uses: easingthemes/ssh-deploy@a1aa0b6cf96ce2406eef90faa35007a4a7bf0ac0 # v5.1.1
|
||||||
env:
|
env:
|
||||||
SSH_PRIVATE_KEY: ${{ env.SSH_PRIVATE_KEY }}
|
SSH_PRIVATE_KEY: ${{ env.SSH_PRIVATE_KEY }}
|
||||||
REMOTE_HOST: ${{ env.SSH_HOST }}
|
REMOTE_HOST: ${{ env.SSH_HOST }}
|
||||||
@@ -75,10 +75,10 @@ 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@v4
|
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
|
||||||
|
|
||||||
- name: Deploy via Rsync & Docker
|
- name: Deploy via Rsync & Docker
|
||||||
uses: easingthemes/ssh-deploy@v5.0.0
|
uses: easingthemes/ssh-deploy@a1aa0b6cf96ce2406eef90faa35007a4a7bf0ac0 # v5.1.1
|
||||||
env:
|
env:
|
||||||
SSH_PRIVATE_KEY: ${{ env.SSH_PRIVATE_KEY }}
|
SSH_PRIVATE_KEY: ${{ env.SSH_PRIVATE_KEY }}
|
||||||
REMOTE_HOST: ${{ env.SSH_HOST }}
|
REMOTE_HOST: ${{ env.SSH_HOST }}
|
||||||
@@ -102,10 +102,10 @@ jobs:
|
|||||||
needs: [deploy_staging]
|
needs: [deploy_staging]
|
||||||
if: github.ref == 'refs/heads/main'
|
if: github.ref == 'refs/heads/main'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
|
||||||
|
|
||||||
- name: Deploy via Rsync & Docker
|
- name: Deploy via Rsync & Docker
|
||||||
uses: easingthemes/ssh-deploy@v5.0.0
|
uses: easingthemes/ssh-deploy@a1aa0b6cf96ce2406eef90faa35007a4a7bf0ac0 # v5.1.1
|
||||||
env:
|
env:
|
||||||
SSH_PRIVATE_KEY: ${{ env.SSH_PRIVATE_KEY }}
|
SSH_PRIVATE_KEY: ${{ env.SSH_PRIVATE_KEY }}
|
||||||
REMOTE_HOST: ${{ env.SSH_HOST }}
|
REMOTE_HOST: ${{ env.SSH_HOST }}
|
||||||
@@ -130,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@v1.0.3
|
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 }}
|
||||||
|
|||||||
4
dev.env
4
dev.env
@@ -4,4 +4,6 @@ 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
|
||||||
TRAEFIK_LEGACY_OPT=
|
ACME_BYPASS=false
|
||||||
|
TRAEFIK_LEGACY_OPT=
|
||||||
|
# TRAEFIK_LEGACY_OPT="--providers.file.filename=/etc/traefik/forward-to-legacy-nginx.yaml"
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
services:
|
services:
|
||||||
traefik:
|
traefik:
|
||||||
image: "traefik:v3.6@sha256:aaf0f6185419a50c74651448c1a5bf4606bd2d2ddb7b8749eed505d55bf8b8ea"
|
image: "traefik:v3.6@sha256:67622638cd88dbfcfba40159bc652ecf0aea0e032f8a3c7e3134ae7c037b9910"
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
security_opt:
|
security_opt:
|
||||||
- no-new-privileges:true
|
- no-new-privileges:true
|
||||||
@@ -13,6 +13,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}"
|
||||||
- "--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"
|
||||||
@@ -37,7 +38,9 @@ services:
|
|||||||
labels:
|
labels:
|
||||||
- "env=${ENV}"
|
- "env=${ENV}"
|
||||||
- "traefik.enable=true"
|
- "traefik.enable=true"
|
||||||
|
- "traefik.http.routers.whoami.priority=100"
|
||||||
- "traefik.http.routers.whoami.rule=Host(`test-whoami.${DOMAIN}`)"
|
- "traefik.http.routers.whoami.rule=Host(`test-whoami.${DOMAIN}`)"
|
||||||
|
- "traefik.http.routers.https.priority=100"
|
||||||
- "traefik.http.routers.https.rule=Host(`test-whoami.${DOMAIN}`)"
|
- "traefik.http.routers.https.rule=Host(`test-whoami.${DOMAIN}`)"
|
||||||
- "traefik.http.routers.whoami.entrypoints=web"
|
- "traefik.http.routers.whoami.entrypoints=web"
|
||||||
- traefik.http.routers.https.entrypoints=https
|
- traefik.http.routers.https.entrypoints=https
|
||||||
|
|||||||
1
prod.env
1
prod.env
@@ -4,4 +4,5 @@ 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.filename=/etc/traefik/forward-to-legacy-nginx.yaml"
|
||||||
@@ -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: 1
|
priority: 10
|
||||||
entryPoints:
|
entryPoints:
|
||||||
- "https"
|
- "https"
|
||||||
|
|
||||||
@@ -23,12 +23,20 @@ tcp:
|
|||||||
|
|
||||||
http:
|
http:
|
||||||
routers:
|
routers:
|
||||||
# Router for HTTP
|
# 1. TRAEFIK-MANAGED ACME HANDLER (Removed manual router)
|
||||||
|
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
|
# Low priority ensures specific containers are handled first, but before the default acme-handler
|
||||||
priority: 1
|
priority: 90
|
||||||
entryPoints:
|
entryPoints:
|
||||||
- "web"
|
- "web"
|
||||||
|
|
||||||
|
|||||||
@@ -4,4 +4,5 @@ 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=
|
||||||
Reference in New Issue
Block a user