diff --git a/docker-compose.production.yml b/docker-compose.production.yml index 930125d..6a37d7d 100644 --- a/docker-compose.production.yml +++ b/docker-compose.production.yml @@ -1,7 +1,7 @@ -# The only stuff that happens here is template gets replaced and so does possibly nixius + # This compose file purely exists as a template for production image builds. services: - template: + n8n: build: - context: ./docker/template + context: ./docker/n8n dockerfile: Dockerfile.production - image: git.nixc.us/nixius/template:production \ No newline at end of file + image: git.nixc.us/nixius/n8n:production \ No newline at end of file diff --git a/docker-compose.staging.yml b/docker-compose.staging.yml index a96c565..0c540d2 100644 --- a/docker-compose.staging.yml +++ b/docker-compose.staging.yml @@ -1,7 +1,7 @@ -# The only stuff that happens here is template gets replaced and so does possibly nixius + # This compose file purely exists as a template for staging and caching image builds. services: - template: + n8n: build: - context: ./docker/template + context: ./docker/n8n dockerfile: Dockerfile.staging - image: git.nixc.us/colin/template:staging \ No newline at end of file + image: git.nixc.us/colin/n8n:staging \ No newline at end of file diff --git a/docker/n8n/Dockerfile b/docker/n8n/Dockerfile new file mode 100644 index 0000000..9d8a5dc --- /dev/null +++ b/docker/n8n/Dockerfile @@ -0,0 +1,2 @@ +# This container mostly pulls from the docker hub registry so we don't care about pull limits in production. There should be no need to change this file. +FROM n8nio/n8n:latest \ No newline at end of file diff --git a/docker/n8n/Dockerfile.production b/docker/n8n/Dockerfile.production new file mode 100644 index 0000000..461e5e0 --- /dev/null +++ b/docker/n8n/Dockerfile.production @@ -0,0 +1,2 @@ +FROM git.nixc.us/nixc/n8n:staging +# This container is mostly intended to be blank but would add production specific changes here if needed only. \ No newline at end of file diff --git a/stack.production.yml b/stack.production.yml index 6f0317d..3f34fee 100644 --- a/stack.production.yml +++ b/stack.production.yml @@ -3,8 +3,8 @@ networks: external: true services: - template: - image: git.nixc.us/nixius/template:production + n8n: + image: git.nixc.us/nixius/n8n:production deploy: replicas: 1 restart_policy: @@ -22,15 +22,12 @@ services: - traefik labels: - traefik.enable=true - - traefik.http.routers.production_template.rule=Host(`template.nixc.us`) - - traefik.http.routers.production_template.entrypoints=websecure - - traefik.http.routers.production_template.tls=true - - traefik.http.routers.production_template.tls.certresolver=letsencryptresolver - - traefik.http.services.production_template.loadbalancer.server.port=3000 - # - traefik.http.services.production_template.loadbalancer.healthcheck.path=/health - # - traefik.http.services.production_template.loadbalancer.healthcheck.interval=30s - # - traefik.http.services.production_template.loadbalancer.healthcheck.timeout=5s - - traefik.http.routers.production_template.middlewares=secure-headers + - traefik.http.routers.production_n8n.rule=Host(`n8n.nixc.us`) + - traefik.http.routers.production_n8n.entrypoints=websecure + - traefik.http.routers.production_n8n.tls=true + - traefik.http.routers.production_n8n.tls.certresolver=letsencryptresolver + - traefik.http.services.production_n8n.loadbalancer.server.port=5678 + - traefik.http.routers.production_n8n.middlewares=secure-headers midtownplaydio: image: git.nixc.us/nixius/midtownplaydio:production diff --git a/stack.staging.yml b/stack.staging.yml index ea38fa1..2e1d0ee 100644 --- a/stack.staging.yml +++ b/stack.staging.yml @@ -31,3 +31,29 @@ services: # - traefik.http.services.staging_template.loadbalancer.healthcheck.path=/health # - traefik.http.services.staging_template.loadbalancer.healthcheck.interval=30s # - traefik.http.services.staging_template.loadbalancer.healthcheck.timeout=5s + + n8n: + image: git.nixc.us/colin/n8n:staging + deploy: + replicas: 1 + restart_policy: + condition: on-failure + max_attempts: 3 + update_config: + parallelism: 1 + delay: 10s + order: start-first + rollback_config: + parallelism: 1 + delay: 10s + order: stop-first + networks: + - traefik + labels: + - traefik.enable=true + - traefik.http.routers.staging_n8n.rule=Host(`staging-n8n.nixc.us`) + - traefik.http.routers.staging_n8n.entrypoints=websecure + - traefik.http.routers.staging_n8n.tls=true + - traefik.http.routers.staging_n8n.tls.certresolver=letsencryptresolver + - traefik.http.services.staging_n8n.loadbalancer.server.port=5678 + - traefik.http.routers.staging_n8n.middlewares=secure-headers