Add LEGACY_NETWORK variable to environment files #13
@@ -8,202 +8,161 @@ on:
|
|||||||
types: [opened, synchronize, reopened, closed]
|
types: [opened, synchronize, reopened, closed]
|
||||||
|
|
||||||
env:
|
env:
|
||||||
# Base path for PR preview environments
|
# --- PATH CONFIGURATION ---
|
||||||
REMOTE_DEPLOY_PATH: /var/app/traefik/test
|
REMOTE_DEPLOY_PATH: /var/app/traefik/test
|
||||||
|
|
||||||
# --- CUSTOMIZABLE PRODUCTION PATH ---
|
|
||||||
# Set the absolute path for your production deployment on the remote server.
|
|
||||||
REMOTE_PROD_PATH: /var/app/traefik/prod
|
REMOTE_PROD_PATH: /var/app/traefik/prod
|
||||||
|
|
||||||
REMOTE_STAGING_PATH: /var/app/traefik/staging
|
REMOTE_STAGING_PATH: /var/app/traefik/staging
|
||||||
|
|
||||||
|
# --- SECRETS ---
|
||||||
SSH_HOST: ${{ secrets.SSH_HOST }}
|
SSH_HOST: ${{ secrets.SSH_HOST }}
|
||||||
SSH_USER: ${{ secrets.SSH_USER }}
|
SSH_USER: ${{ secrets.SSH_USER }}
|
||||||
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||||
SSH_PORT: ${{ secrets.SSH_PORT || 22 }}
|
SSH_PORT: ${{ secrets.SSH_PORT || 22 }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
prepare_deployment_vars:
|
# ------------------------------------------------------------------
|
||||||
name: Prepare deployment vars
|
# STAGE 1: PREPARE
|
||||||
|
# Calculate dynamic paths (like PR folders) so other jobs can use them
|
||||||
|
# ------------------------------------------------------------------
|
||||||
|
prepare_context:
|
||||||
|
name: Prepare Context
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
deploy_path: ${{ steps.set-vars.outputs.deploy_path }}
|
pr_path: ${{ steps.calc.outputs.pr_path }}
|
||||||
steps:
|
steps:
|
||||||
- name: Set deployment variables
|
- id: calc
|
||||||
id: set-vars
|
|
||||||
run: |
|
run: |
|
||||||
REPO_NAME=$(echo "${{ github.repository }}" | cut -d '/' -f 2)
|
REPO_NAME=$(echo "${{ github.repository }}" | cut -d '/' -f 2)
|
||||||
|
# Only needed for PRs
|
||||||
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
|
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
|
||||||
# For PRs, create a unique directory under the base path
|
echo "pr_path=${REMOTE_DEPLOY_PATH}/${REPO_NAME}-pr-${{ github.event.pull_request.number }}" >> $GITHUB_OUTPUT
|
||||||
DEPLOY_PATH="${REMOTE_DEPLOY_PATH}/${REPO_NAME}-pr-${{ github.event.pull_request.number }}"
|
|
||||||
else
|
|
||||||
# For 'main' branch, use the specified production path.
|
|
||||||
# Fallback to a default if REMOTE_PROD_PATH is empty.
|
|
||||||
DEPLOY_PATH="${REMOTE_PROD_PATH:-${REMOTE_DEPLOY_PATH}/main}"
|
|
||||||
fi
|
fi
|
||||||
echo "DEPLOY_PATH=${DEPLOY_PATH}" >> $GITHUB_ENV
|
|
||||||
echo "deploy_path=${DEPLOY_PATH}" >> $GITHUB_OUTPUT
|
|
||||||
echo "DEPLOY_PATH will be: ${DEPLOY_PATH}"
|
|
||||||
|
|
||||||
create_remote_directory:
|
# ------------------------------------------------------------------
|
||||||
name: Create remote directory
|
# STAGE 2: DEPLOY PREVIEW (DEV)
|
||||||
|
# Runs only on Pull Requests
|
||||||
|
# ------------------------------------------------------------------
|
||||||
|
deploy_preview:
|
||||||
|
name: Deploy (Dev/Preview)
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: prepare_deployment_vars
|
needs: prepare_context
|
||||||
if: |
|
if: github.event_name == 'pull_request' && github.event.action != 'closed'
|
||||||
(github.event_name == 'pull_request' && github.event.action != 'closed' && github.event.pull_request.merged == false)
|
|
||||||
|| github.ref == 'refs/heads/main'
|
|
||||||
steps:
|
steps:
|
||||||
- name: Setup SSH
|
- uses: actions/checkout@v4
|
||||||
uses: webfactory/ssh-agent@a6f90b1f127823b31d4d4a8d96047790581349bd # v0.9.1
|
- uses: webfactory/ssh-agent@v0.9.0
|
||||||
with:
|
with: { ssh-private-key: ${{ env.SSH_PRIVATE_KEY }} }
|
||||||
ssh-private-key: ${{ env.SSH_PRIVATE_KEY }}
|
|
||||||
|
|
||||||
- name: Add host to known_hosts
|
- name: Sync & Build
|
||||||
run: |
|
run: |
|
||||||
mkdir -p ~/.ssh
|
# 1. Setup Known Hosts
|
||||||
chmod 700 ~/.ssh
|
mkdir -p ~/.ssh && ssh-keyscan -p ${{ env.SSH_PORT }} ${{ env.SSH_HOST }} >> ~/.ssh/known_hosts
|
||||||
ssh-keyscan -p "$SSH_PORT" -T 10 -H "$SSH_HOST" >> ~/.ssh/known_hosts 2>/dev/null || {
|
|
||||||
echo "::error::Failed to ssh-keyscan $SSH_HOST:$SSH_PORT"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
chmod 644 ~/.ssh/known_hosts
|
|
||||||
|
|
||||||
- name: Create directory on remote
|
# 2. Define Target
|
||||||
run: ssh -p "$SSH_PORT" $SSH_USER@$SSH_HOST "mkdir -p '${{ needs.prepare_deployment_vars.outputs.deploy_path }}'"
|
TARGET="${{ needs.prepare_context.outputs.pr_path }}"
|
||||||
|
|
||||||
sync_repo_files:
|
# 3. Create Remote Dir
|
||||||
name: Sync repository files
|
ssh -p ${{ env.SSH_PORT }} ${{ env.SSH_USER }}@${{ env.SSH_HOST }} "mkdir -p '$TARGET'"
|
||||||
|
|
||||||
|
# 4. Sync Files (Exclude .git to save bandwidth)
|
||||||
|
rsync -avz -e "ssh -p ${{ env.SSH_PORT }}" \
|
||||||
|
--exclude '.git/' --exclude '.github/' \
|
||||||
|
./ ${{ env.SSH_USER }}@${{ env.SSH_HOST }}:$TARGET/
|
||||||
|
|
||||||
|
# 5. Build and Run on Server
|
||||||
|
ssh -p ${{ env.SSH_PORT }} ${{ env.SSH_USER }}@${{ env.SSH_HOST }} "
|
||||||
|
cd '$TARGET'
|
||||||
|
docker compose --env-file dev.env -f docker-compose.yaml up -d --build --remove-orphans
|
||||||
|
"
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------
|
||||||
|
# STAGE 3: DEPLOY STAGING
|
||||||
|
# Runs on 'main'. Always runs before Prod.
|
||||||
|
# ------------------------------------------------------------------
|
||||||
|
deploy_staging:
|
||||||
|
name: Deploy (Staging)
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [create_remote_directory, prepare_deployment_vars]
|
|
||||||
if: |
|
|
||||||
(github.event_name == 'pull_request' && github.event.action != 'closed' && github.event.pull_request.merged == false)
|
|
||||||
|| github.ref == 'refs/heads/main'
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6
|
|
||||||
|
|
||||||
- name: Sync files via scp
|
|
||||||
uses: appleboy/scp-action@master
|
|
||||||
with:
|
|
||||||
host: ${{ env.SSH_HOST }}
|
|
||||||
username: ${{ env.SSH_USER }}
|
|
||||||
key: ${{ env.SSH_PRIVATE_KEY }}
|
|
||||||
port: ${{ env.SSH_PORT }}
|
|
||||||
source: "./"
|
|
||||||
target: "${{ needs.prepare_deployment_vars.outputs.deploy_path }}"
|
|
||||||
|
|
||||||
- name: Sync file via scp (staging)
|
|
||||||
if: github.ref == 'refs/heads/main'
|
if: github.ref == 'refs/heads/main'
|
||||||
uses: appleboy/scp-action@master
|
|
||||||
with:
|
|
||||||
host: ${{ env.SSH_HOST }}
|
|
||||||
username: ${{ env.SSH_USER }}
|
|
||||||
key: ${{ env.SSH_PRIVATE_KEY }}
|
|
||||||
port: ${{ env.SSH_PORT }}
|
|
||||||
source: "./"
|
|
||||||
target: ${{ env.REMOTE_STAGING_PATH }}
|
|
||||||
|
|
||||||
run_docker_compose_dev:
|
|
||||||
name: Run docker-compose remotely (Dev)
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: [sync_repo_files, prepare_deployment_vars]
|
|
||||||
if: |
|
|
||||||
(github.event_name == 'pull_request' && github.event.action != 'closed' && github.event.pull_request.merged == false)
|
|
||||||
steps:
|
steps:
|
||||||
- name: Setup SSH
|
- uses: actions/checkout@v4
|
||||||
uses: webfactory/ssh-agent@a6f90b1f127823b31d4d4a8d96047790581349bd # v0.9.1
|
- uses: webfactory/ssh-agent@v0.9.0
|
||||||
with:
|
with: { ssh-private-key: ${{ env.SSH_PRIVATE_KEY }} }
|
||||||
ssh-private-key: ${{ env.SSH_PRIVATE_KEY }}
|
|
||||||
|
|
||||||
- name: Add host to known_hosts
|
- name: Sync & Build
|
||||||
run: |
|
run: |
|
||||||
mkdir -p ~/.ssh
|
mkdir -p ~/.ssh && ssh-keyscan -p ${{ env.SSH_PORT }} ${{ env.SSH_HOST }} >> ~/.ssh/known_hosts
|
||||||
chmod 700 ~/.ssh
|
|
||||||
ssh-keyscan -p "$SSH_PORT" -T 10 -H "$SSH_HOST" >> ~/.ssh/known_hosts 2>/dev/null || {
|
|
||||||
echo "::error::Failed to ssh-keyscan $SSH_HOST:$SSH_PORT"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
chmod 644 ~/.ssh/known_hosts
|
|
||||||
|
|
||||||
- name: Run docker-compose on remote host
|
TARGET="${{ env.REMOTE_STAGING_PATH }}"
|
||||||
run: ssh -p "$SSH_PORT" $SSH_USER@$SSH_HOST "cd '${{ needs.prepare_deployment_vars.outputs.deploy_path }}' && docker-compose --env-file dev.env -f docker-compose.yaml up -d --build"
|
|
||||||
|
|
||||||
run_docker_compose_staging:
|
ssh -p ${{ env.SSH_PORT }} ${{ env.SSH_USER }}@${{ env.SSH_HOST }} "mkdir -p '$TARGET'"
|
||||||
name: Run docker-compose remotely (Staging)
|
|
||||||
|
rsync -avz -e "ssh -p ${{ env.SSH_PORT }}" \
|
||||||
|
--exclude '.git/' --exclude '.github/' \
|
||||||
|
./ ${{ env.SSH_USER }}@${{ env.SSH_HOST }}:$TARGET/
|
||||||
|
|
||||||
|
ssh -p ${{ env.SSH_PORT }} ${{ env.SSH_USER }}@${{ env.SSH_HOST }} "
|
||||||
|
cd '$TARGET'
|
||||||
|
docker compose --env-file staging.env -f docker-compose.yaml up -d --build --remove-orphans
|
||||||
|
"
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------
|
||||||
|
# STAGE 4: DEPLOY PRODUCTION
|
||||||
|
# Runs on 'main'. DEPENDS ON STAGING SUCCESS.
|
||||||
|
# ------------------------------------------------------------------
|
||||||
|
deploy_prod:
|
||||||
|
name: Deploy (Production)
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [sync_repo_files, prepare_deployment_vars]
|
needs: deploy_staging # <--- This is the key logic separation
|
||||||
if: |
|
if: github.ref == 'refs/heads/main'
|
||||||
(github.ref == 'refs/heads/main')
|
|
||||||
steps:
|
steps:
|
||||||
- name: Setup SSH
|
- uses: actions/checkout@v4
|
||||||
uses: webfactory/ssh-agent@a6f90b1f127823b31d4d4a8d96047790581349bd # v0.9.1
|
- uses: webfactory/ssh-agent@v0.9.0
|
||||||
with:
|
with: { ssh-private-key: ${{ env.SSH_PRIVATE_KEY }} }
|
||||||
ssh-private-key: ${{ env.SSH_PRIVATE_KEY }}
|
|
||||||
|
|
||||||
- name: Add host to known_hosts
|
- name: Sync & Build
|
||||||
run: |
|
run: |
|
||||||
mkdir -p ~/.ssh
|
mkdir -p ~/.ssh && ssh-keyscan -p ${{ env.SSH_PORT }} ${{ env.SSH_HOST }} >> ~/.ssh/known_hosts
|
||||||
chmod 700 ~/.ssh
|
|
||||||
ssh-keyscan -p "$SSH_PORT" -T 10 -H "$SSH_HOST" >> ~/.ssh/known_hosts 2>/dev/null || {
|
|
||||||
echo "::error::Failed to ssh-keyscan $SSH_HOST:$SSH_PORT"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
chmod 644 ~/.ssh/known_hosts
|
|
||||||
|
|
||||||
- name: Run docker-compose on remote host
|
TARGET="${{ env.REMOTE_PROD_PATH }}"
|
||||||
run: ssh -p "$SSH_PORT" $SSH_USER@$SSH_HOST "cd '${REMOTE_STAGING_PATH}' && docker-compose --env-file staging.env -f docker-compose.yaml up -d --build"
|
|
||||||
|
|
||||||
run_docker_compose_prod:
|
ssh -p ${{ env.SSH_PORT }} ${{ env.SSH_USER }}@${{ env.SSH_HOST }} "mkdir -p '$TARGET'"
|
||||||
name: Run docker-compose remotely (Prod)
|
|
||||||
|
rsync -avz -e "ssh -p ${{ env.SSH_PORT }}" \
|
||||||
|
--exclude '.git/' --exclude '.github/' \
|
||||||
|
./ ${{ env.SSH_USER }}@${{ env.SSH_HOST }}:$TARGET/
|
||||||
|
|
||||||
|
# Note: Since Staging just built this commit on the same server,
|
||||||
|
# this build step will be nearly instant (using Docker cache).
|
||||||
|
ssh -p ${{ env.SSH_PORT }} ${{ env.SSH_USER }}@${{ env.SSH_HOST }} "
|
||||||
|
cd '$TARGET'
|
||||||
|
docker compose --env-file prod.env -f docker-compose.yaml up -d --build --remove-orphans
|
||||||
|
"
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------
|
||||||
|
# CLEANUP (On PR Close)
|
||||||
|
# ------------------------------------------------------------------
|
||||||
|
cleanup:
|
||||||
|
name: Cleanup Preview
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [sync_repo_files, prepare_deployment_vars]
|
needs: prepare_context
|
||||||
if: |
|
if: github.event_name == 'pull_request' && (github.event.action == 'closed' || github.event.pull_request.merged == true)
|
||||||
(github.ref == 'refs/heads/main')
|
|
||||||
steps:
|
steps:
|
||||||
- name: Setup SSH
|
- uses: webfactory/ssh-agent@v0.9.0
|
||||||
uses: webfactory/ssh-agent@a6f90b1f127823b31d4d4a8d96047790581349bd # v0.9.1
|
with: { ssh-private-key: ${{ env.SSH_PRIVATE_KEY }} }
|
||||||
with:
|
|
||||||
ssh-private-key: ${{ env.SSH_PRIVATE_KEY }}
|
|
||||||
|
|
||||||
- name: Add host to known_hosts
|
- name: Remove Remote Environment
|
||||||
run: |
|
run: |
|
||||||
mkdir -p ~/.ssh
|
mkdir -p ~/.ssh && ssh-keyscan -p ${{ env.SSH_PORT }} ${{ env.SSH_HOST }} >> ~/.ssh/known_hosts
|
||||||
chmod 700 ~/.ssh
|
|
||||||
ssh-keyscan -p "$SSH_PORT" -T 10 -H "$SSH_HOST" >> ~/.ssh/known_hosts 2>/dev/null || {
|
|
||||||
echo "::error::Failed to ssh-keyscan $SSH_HOST:$SSH_PORT"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
chmod 644 ~/.ssh/known_hosts
|
|
||||||
|
|
||||||
- name: Run docker-compose on remote host
|
TARGET="${{ needs.prepare_context.outputs.pr_path }}"
|
||||||
run: ssh -p "$SSH_PORT" $SSH_USER@$SSH_HOST "cd '${{ needs.prepare_deployment_vars.outputs.deploy_path }}' && docker-compose --env-file prod.env -f docker-compose.yaml up -d --build"
|
|
||||||
|
|
||||||
cleanup_mr_environment:
|
ssh -p ${{ env.SSH_PORT }} ${{ env.SSH_USER }}@${{ env.SSH_HOST }} "
|
||||||
name: Cleanup MR environment
|
if [ -d '$TARGET' ]; then
|
||||||
runs-on: ubuntu-latest
|
cd '$TARGET'
|
||||||
needs: prepare_deployment_vars
|
docker compose down -v || true
|
||||||
if: |
|
cd ..
|
||||||
github.event_name == 'pull_request' &&
|
rm -rf '$TARGET'
|
||||||
(github.event.action == 'closed' || github.event.pull_request.merged == true)
|
echo 'Cleanup successful'
|
||||||
steps:
|
else
|
||||||
- name: Setup SSH
|
echo 'Directory not found, skipping.'
|
||||||
uses: webfactory/ssh-agent@a6f90b1f127823b31d4d4a8d96047790581349bd # v0.9.1
|
fi
|
||||||
with:
|
"
|
||||||
ssh-private-key: ${{ env.SSH_PRIVATE_KEY }}
|
|
||||||
|
|
||||||
- name: Add host to known_hosts
|
|
||||||
run: |
|
|
||||||
mkdir -p ~/.ssh
|
|
||||||
chmod 700 ~/.ssh
|
|
||||||
ssh-keyscan -p "$SSH_PORT" -T 10 -H "$SSH_HOST" >> ~/.ssh/known_hosts 2>/dev/null || {
|
|
||||||
echo "::error::Failed to ssh-keyscan $SSH_HOST:$SSH_PORT"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
chmod 644 ~/.ssh/known_hosts
|
|
||||||
|
|
||||||
- name: Run docker-compose down on remote host
|
|
||||||
run: ssh -p "$SSH_PORT" $SSH_USER@$SSH_HOST "cd '${{ needs.prepare_deployment_vars.outputs.deploy_path }}' && docker-compose down"
|
|
||||||
|
|
||||||
- name: Delete deployment directory
|
|
||||||
run: |
|
|
||||||
ssh -p "$SSH_PORT" $SSH_USER@$SSH_HOST "if [ -d '${{ needs.prepare_deployment_vars.outputs.deploy_path }}' ]; then rm -rf '${{ needs.prepare_deployment_vars.outputs.deploy_path }}'; echo 'Directory removed.'; else echo 'Directory not found, skipping.'; fi"
|
|
||||||
1
dev.env
1
dev.env
@@ -5,4 +5,3 @@ 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=
|
TRAEFIK_LEGACY_OPT=
|
||||||
EXTRA_NETWORK=proxy
|
|
||||||
50
docker-compose.prod.yaml
Normal file
50
docker-compose.prod.yaml
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
services:
|
||||||
|
traefik:
|
||||||
|
image: "traefik:v3.6@sha256:aaf0f6185419a50c74651448c1a5bf4606bd2d2ddb7b8749eed505d55bf8b8ea"
|
||||||
|
restart: unless-stopped
|
||||||
|
security_opt:
|
||||||
|
- no-new-privileges:true
|
||||||
|
networks:
|
||||||
|
- proxy
|
||||||
|
command:
|
||||||
|
- "--providers.docker=true"
|
||||||
|
- "--providers.docker.exposedbydefault=false"
|
||||||
|
- "--providers.docker.network=proxy"
|
||||||
|
- "--providers.docker.constraints=Label(`env`, `${ENV}`)"
|
||||||
|
- "--entryPoints.web.address=:80"
|
||||||
|
- "--entryPoints.https.address=:443"
|
||||||
|
- "--certificatesresolvers.letsencrypt.acme.httpchallenge=true"
|
||||||
|
- "--certificatesresolvers.letsencrypt.acme.httpchallenge.entrypoint=web"
|
||||||
|
- "--certificatesresolvers.letsencrypt.acme.email=kovagoadi@gmail.com"
|
||||||
|
- "--certificatesresolvers.letsencrypt.acme.storage=/letsencrypt/acme.json"
|
||||||
|
- "--certificatesResolvers.letsencrypt.acme.caServer=${CERTBOT_CA_RESOLVER}"
|
||||||
|
- "${TRAEFIK_LEGACY_OPT:-}"
|
||||||
|
- "--providers.file.watch=true"
|
||||||
|
ports:
|
||||||
|
- "${PORT}:80"
|
||||||
|
- "${HTTPS_PORT}:443"
|
||||||
|
- "8080"
|
||||||
|
volumes:
|
||||||
|
- "/var/run/docker.sock:/var/run/docker.sock:ro"
|
||||||
|
- "./data/letsencrypt:/letsencrypt"
|
||||||
|
- "./${ENV}/forward-to-legacy-nginx.yaml:/etc/traefik/forward-to-legacy-nginx.yaml"
|
||||||
|
|
||||||
|
whoami:
|
||||||
|
image: "traefik/whoami@sha256:200689790a0a0ea48ca45992e0450bc26ccab5307375b41c84dfc4f2475937ab"
|
||||||
|
restart: unless-stopped
|
||||||
|
networks:
|
||||||
|
- proxy
|
||||||
|
labels:
|
||||||
|
- "env=${ENV}"
|
||||||
|
- "traefik.enable=true"
|
||||||
|
- "traefik.http.routers.whoami.rule=Host(`test-whoami.${DOMAIN}`)"
|
||||||
|
- "traefik.http.routers.https.rule=Host(`test-whoami.${DOMAIN}`)"
|
||||||
|
- "traefik.http.routers.whoami.entrypoints=web"
|
||||||
|
- traefik.http.routers.https.entrypoints=https
|
||||||
|
- traefik.http.routers.https.tls=true
|
||||||
|
- traefik.http.routers.https.tls.certresolver=letsencrypt
|
||||||
|
networks:
|
||||||
|
proxy:
|
||||||
|
legacy-nginx:
|
||||||
|
name: proxy
|
||||||
|
external: true
|
||||||
@@ -6,7 +6,6 @@ services:
|
|||||||
- no-new-privileges:true
|
- no-new-privileges:true
|
||||||
networks:
|
networks:
|
||||||
- proxy
|
- proxy
|
||||||
- ${EXTRA_NETWORK}
|
|
||||||
command:
|
command:
|
||||||
- "--providers.docker=true"
|
- "--providers.docker=true"
|
||||||
- "--providers.docker.exposedbydefault=false"
|
- "--providers.docker.exposedbydefault=false"
|
||||||
|
|||||||
1
prod.env
1
prod.env
@@ -5,4 +5,3 @@ 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
|
||||||
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"
|
||||||
EXTRA_NETWORK=legacy-nginx
|
|
||||||
@@ -5,4 +5,3 @@ 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
|
||||||
TRAEFIK_LEGACY_OPT=
|
TRAEFIK_LEGACY_OPT=
|
||||||
EXTRA_NETWORK=proxy
|
|
||||||
Reference in New Issue
Block a user