fix: use external sh script to write Traefik config — avoid YAML escaping issues
Some checks failed
Deploy / deploy (push) Failing after 3m41s
Some checks failed
Deploy / deploy (push) Failing after 3m41s
This commit is contained in:
13
.github/workflows/deploy.yml
vendored
13
.github/workflows/deploy.yml
vendored
@@ -39,18 +39,7 @@ jobs:
|
||||
docker compose -f docker-compose.production.yml up -d
|
||||
|
||||
- name: Register Traefik route
|
||||
env:
|
||||
TRAEFIK_RULE: "Host(`api-ubigeo.darkcodex.dev`)"
|
||||
run: |
|
||||
docker run --rm \
|
||||
-e TRAEFIK_RULE \
|
||||
-v /etc/easypanel/traefik/config:/traefik-config \
|
||||
alpine sh -c '
|
||||
OUT=/traefik-config/api-ubigeo.yaml
|
||||
[ -f "$OUT" ] && echo "route already exists" && exit 0
|
||||
printf "http:\n routers:\n ubigeo-api:\n rule: \"%s\"\n service: ubigeo-api\n entryPoints:\n - websecure\n tls:\n certResolver: letsencrypt\n services:\n ubigeo-api:\n loadBalancer:\n servers:\n - url: \"http://ubigeo-api:3200\"\n" "$TRAEFIK_RULE" > "$OUT"
|
||||
echo "Traefik route created"
|
||||
'
|
||||
run: sh /workspace/darkcodex/api-ubigeo/scripts/register-traefik.sh
|
||||
|
||||
- name: Health check
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user