diff --git a/docker-bake.hcl b/docker-bake.hcl deleted file mode 100644 index 8cea230..0000000 --- a/docker-bake.hcl +++ /dev/null @@ -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" - } -} \ No newline at end of file diff --git a/stack.production.yml b/stack.production.yml index 13a9f53..e2f4510 100644 --- a/stack.production.yml +++ b/stack.production.yml @@ -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: diff --git a/stack.staging.yml b/stack.staging.yml index f55efaa..29e0a44 100644 --- a/stack.staging.yml +++ b/stack.staging.yml @@ -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: