fix: move Traefik labels to deploy section for Swarm compatibility
ci/woodpecker/push/woodpecker Pipeline was successful Details

This commit is contained in:
Leopere 2025-04-05 13:59:21 -04:00
parent 6d34205b4f
commit ece3a7eea4
3 changed files with 20 additions and 55 deletions

View File

@ -1,35 +0,0 @@
variable "REGISTRY" {
default = "git.nixc.us/colin"
}
variable "TAG" {
default = "latest"
}
group "default" {
targets = ["staging", "production"]
}
target "staging" {
context = "."
dockerfile = "Dockerfile"
tags = ["${REGISTRY}/n8n:staging"]
platforms = ["linux/amd64"]
cache-from = ["type=registry,ref=${REGISTRY}/n8n:cache"]
cache-to = ["type=registry,ref=${REGISTRY}/n8n:cache"]
args = {
NODE_ENV = "production"
}
}
target "production" {
context = "."
dockerfile = "Dockerfile"
tags = ["${REGISTRY}/n8n:production"]
platforms = ["linux/amd64"]
cache-from = ["type=registry,ref=${REGISTRY}/n8n:cache"]
cache-to = ["type=registry,ref=${REGISTRY}/n8n:cache"]
args = {
NODE_ENV = "production"
}
}

View File

@ -22,6 +22,16 @@ services:
placement:
constraints:
- node.hostname == macmini14
labels:
us.nixc.autodeploy: "true"
traefik.enable: "true"
traefik.http.routers.production_n8n.tls: "true"
traefik.http.services.production_n8n.loadbalancer.server.port: "5678"
traefik.http.routers.production_n8n.rule: "Host(`n8n.nixc.us`)"
traefik.http.routers.production_n8n.entrypoints: "websecure"
traefik.http.routers.production_n8n.tls.certresolver: "letsencryptresolver"
traefik.http.routers.production_n8n.service: "production_n8n"
traefik.docker.network: "traefik"
networks:
- traefik
environment:
@ -33,16 +43,6 @@ services:
N8N_RUNNERS_ENABLED: "true"
volumes:
- n8n_data:/home/node/.n8n
labels:
us.nixc.autodeploy: "true"
traefik.enable: "true"
traefik.http.routers.production_n8n.tls: "true"
traefik.http.services.production_n8n.loadbalancer.server.port: "5678"
traefik.http.routers.production_n8n.rule: "Host(`n8n.nixc.us`)"
traefik.http.routers.production_n8n.entrypoints: "websecure"
traefik.http.routers.production_n8n.tls.certresolver: "letsencryptresolver"
traefik.http.routers.production_n8n.service: "production_n8n"
traefik.docker.network: "traefik"
volumes:
n8n_data:

View File

@ -50,6 +50,16 @@ services:
placement:
constraints:
- node.hostname == macmini14
labels:
us.nixc.autodeploy: "true"
traefik.enable: "true"
traefik.http.routers.staging_n8n.tls: "true"
traefik.http.services.staging_n8n.loadbalancer.server.port: "5678"
traefik.http.routers.staging_n8n.rule: "Host(`staging-n8n.nixc.us`)"
traefik.http.routers.staging_n8n.entrypoints: "websecure"
traefik.http.routers.staging_n8n.tls.certresolver: "letsencryptresolver"
traefik.http.routers.staging_n8n.service: "staging_n8n"
traefik.docker.network: "traefik"
networks:
- traefik
environment:
@ -61,16 +71,6 @@ services:
N8N_RUNNERS_ENABLED: "true"
volumes:
- n8n_data:/home/node/.n8n
labels:
us.nixc.autodeploy: "true"
traefik.enable: "true"
traefik.http.routers.staging_n8n.tls: "true"
traefik.http.services.staging_n8n.loadbalancer.server.port: "5678"
traefik.http.routers.staging_n8n.rule: "Host(`staging-n8n.nixc.us`)"
traefik.http.routers.staging_n8n.entrypoints: "websecure"
traefik.http.routers.staging_n8n.tls.certresolver: "letsencryptresolver"
traefik.http.routers.staging_n8n.service: "staging_n8n"
traefik.docker.network: "traefik"
volumes:
n8n_data: