├── .editorconfig ├── .gitattributes ├── .github ├── CODEOWNERS ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── bug.yml │ ├── config.yml │ └── feature.yml ├── SUPPORT.md ├── dependabot.yml ├── docker-n8n.jpg ├── labels.yml └── workflows │ ├── build.yml │ ├── labels.yml │ └── test.yml ├── CHANGELOG.md ├── Dockerfile ├── LICENSE ├── README.md ├── docker-bake.hcl ├── examples ├── compose │ ├── .env │ └── compose.yml └── traefik │ ├── .env │ ├── README.md │ └── compose.yml └── test ├── .env └── compose.yml /.editorconfig: -------------------------------------------------------------------------------- 1 | # This file is for unifying the coding style for different editors and IDEs. 2 | # More information at http://editorconfig.org 3 | 4 | root = true 5 | 6 | [*] 7 | indent_style = space 8 | indent_size = 2 9 | end_of_line = lf 10 | charset = utf-8 11 | trim_trailing_whitespace = true 12 | insert_final_newline = true 13 | 14 | [*.md] 15 | trim_trailing_whitespace = false 16 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | /*.sh linguist-detectable=false 2 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @crazy-max 2 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: crazy-max 2 | custom: https://www.paypal.me/crazyws 3 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug.yml: -------------------------------------------------------------------------------- 1 | # https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema 2 | name: Bug Report 3 | description: Report a bug 4 | labels: 5 | - kind/bug 6 | - status/triage 7 | 8 | body: 9 | - type: checkboxes 10 | attributes: 11 | label: Support guidelines 12 | description: Please read the support guidelines before proceeding. 13 | options: 14 | - label: I've read the [support guidelines](https://github.com/crazy-max/docker-n8n/blob/master/.github/SUPPORT.md) 15 | required: true 16 | 17 | - type: checkboxes 18 | attributes: 19 | label: I've found a bug and checked that ... 20 | description: | 21 | Make sure that your request fulfills all of the following requirements. If one requirement cannot be satisfied, explain in detail why. 22 | options: 23 | - label: ... the documentation does not mention anything about my problem 24 | - label: ... there are no open or closed issues that are related to my problem 25 | 26 | - type: textarea 27 | attributes: 28 | label: Description 29 | description: | 30 | Please provide a brief description of the bug in 1-2 sentences. 31 | validations: 32 | required: true 33 | 34 | - type: textarea 35 | attributes: 36 | label: Expected behaviour 37 | description: | 38 | Please describe precisely what you'd expect to happen. 39 | validations: 40 | required: true 41 | 42 | - type: textarea 43 | attributes: 44 | label: Actual behaviour 45 | description: | 46 | Please describe precisely what is actually happening. 47 | validations: 48 | required: true 49 | 50 | - type: textarea 51 | attributes: 52 | label: Steps to reproduce 53 | description: | 54 | Please describe the steps to reproduce the bug. 55 | placeholder: | 56 | 1. ... 57 | 2. ... 58 | 3. ... 59 | validations: 60 | required: true 61 | 62 | - type: textarea 63 | attributes: 64 | label: Docker info 65 | description: | 66 | Output of `docker info` command. 67 | render: text 68 | validations: 69 | required: true 70 | 71 | - type: textarea 72 | attributes: 73 | label: Docker Compose config 74 | description: | 75 | Output of `docker compose config` command. 76 | render: yaml 77 | 78 | - type: textarea 79 | attributes: 80 | label: Logs 81 | description: | 82 | Please provide the container logs (set `LOG_LEVEL=debug` if applicable). 83 | render: text 84 | validations: 85 | required: true 86 | 87 | - type: textarea 88 | attributes: 89 | label: Additional info 90 | description: | 91 | Please provide any additional information that seem useful. 92 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | # https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/configuring-issue-templates-for-your-repository#configuring-the-template-chooser 2 | blank_issues_enabled: true 3 | contact_links: 4 | - name: Questions and Discussions 5 | url: https://github.com/crazy-max/docker-n8n/discussions/new 6 | about: Use Github Discussions to ask questions and/or open discussion topics. 7 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature.yml: -------------------------------------------------------------------------------- 1 | # https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema 2 | name: Feature request 3 | description: Missing functionality? Come tell us about it! 4 | labels: 5 | - kind/enhancement 6 | - status/triage 7 | 8 | body: 9 | - type: textarea 10 | id: description 11 | attributes: 12 | label: Description 13 | description: What is the feature you want to see? 14 | validations: 15 | required: true 16 | -------------------------------------------------------------------------------- /.github/SUPPORT.md: -------------------------------------------------------------------------------- 1 | # Support [](https://isitmaintained.com/project/crazy-max/docker-n8n) 2 | 3 | ## Reporting an issue 4 | 5 | Please do a search in [open issues](https://github.com/crazy-max/docker-n8n/issues?utf8=%E2%9C%93&q=) to see if the issue or feature request has already been filed. 6 | 7 | If you find your issue already exists, make relevant comments and add your [reaction](https://github.com/blog/2119-add-reactions-to-pull-requests-issues-and-comments). Use a reaction in place of a "+1" comment. 8 | 9 | :+1: - upvote 10 | 11 | :-1: - downvote 12 | 13 | If you cannot find an existing issue that describes your bug or feature, submit an issue using the guidelines below. 14 | 15 | ## Writing good bug reports and feature requests 16 | 17 | File a single issue per problem and feature request. 18 | 19 | * Do not enumerate multiple bugs or feature requests in the same issue. 20 | * Do not add your issue as a comment to an existing issue unless it's for the identical input. Many issues look similar, but have different causes. 21 | 22 | The more information you can provide, the more likely someone will be successful reproducing the issue and finding a fix. 23 | 24 | You are now ready to [create a new issue](https://github.com/crazy-max/docker-n8n/issues/new/choose)! 25 | 26 | ## Closure policy 27 | 28 | * Support directly related to n8n will not be provided if your problem is not related to the operation of this image. 29 | * Issues that don't have the information requested above (when applicable) will be closed immediately and the poster directed to the support guidelines. 30 | * Issues that go a week without a response from original poster are subject to closure at my discretion. 31 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: "github-actions" 4 | directory: "/" 5 | schedule: 6 | interval: "daily" 7 | time: "08:00" 8 | timezone: "Europe/Paris" 9 | labels: 10 | - "kind/dependencies" 11 | - "bot" 12 | -------------------------------------------------------------------------------- /.github/docker-n8n.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/crazy-max/docker-n8n/b47a7c2b5bfa6ab7e51592a5b16a3fc83fc9bcf9/.github/docker-n8n.jpg -------------------------------------------------------------------------------- /.github/labels.yml: -------------------------------------------------------------------------------- 1 | ## more info https://github.com/crazy-max/ghaction-github-labeler 2 | - 3 | name: "bot" 4 | color: "69cde9" 5 | description: "" 6 | - 7 | name: "good first issue" 8 | color: "7057ff" 9 | description: "" 10 | - 11 | name: "help wanted" 12 | color: "4caf50" 13 | description: "" 14 | - 15 | name: "area/ci" 16 | color: "ed9ca9" 17 | description: "" 18 | - 19 | name: "area/dockerfile" 20 | color: "03a9f4" 21 | description: "" 22 | - 23 | name: "kind/bug" 24 | color: "b60205" 25 | description: "" 26 | - 27 | name: "kind/dependencies" 28 | color: "0366d6" 29 | description: "" 30 | - 31 | name: "kind/docs" 32 | color: "c5def5" 33 | description: "" 34 | - 35 | name: "kind/duplicate" 36 | color: "cccccc" 37 | description: "" 38 | - 39 | name: "kind/enhancement" 40 | color: "0054ca" 41 | description: "" 42 | - 43 | name: "kind/invalid" 44 | color: "e6e6e6" 45 | description: "" 46 | - 47 | name: "kind/upstream" 48 | color: "fbca04" 49 | description: "" 50 | - 51 | name: "kind/wontfix" 52 | color: "ffffff" 53 | description: "" 54 | - 55 | name: "status/automerge" 56 | color: "8f4fbc" 57 | description: "" 58 | - 59 | name: "status/needs-investigation" 60 | color: "e6625b" 61 | description: "" 62 | - 63 | name: "status/needs-more-info" 64 | color: "795548" 65 | description: "" 66 | - 67 | name: "status/stale" 68 | color: "237da0" 69 | description: "" 70 | - 71 | name: "status/triage" 72 | color: "dde4b7" 73 | description: "" 74 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: build 2 | 3 | concurrency: 4 | group: ${{ github.workflow }}-${{ github.ref }} 5 | cancel-in-progress: true 6 | 7 | on: 8 | push: 9 | branches: 10 | - 'master' 11 | tags: 12 | - '*' 13 | paths-ignore: 14 | - '**.md' 15 | pull_request: 16 | paths-ignore: 17 | - '**.md' 18 | 19 | env: 20 | DOCKERHUB_SLUG: crazymax/n8n 21 | GHCR_SLUG: ghcr.io/crazy-max/n8n 22 | 23 | jobs: 24 | build: 25 | runs-on: ubuntu-latest 26 | steps: 27 | - 28 | name: Checkout 29 | uses: actions/checkout@v3 30 | - 31 | name: Docker meta 32 | id: meta 33 | uses: docker/metadata-action@v4 34 | with: 35 | images: | 36 | ${{ env.DOCKERHUB_SLUG }} 37 | ${{ env.GHCR_SLUG }} 38 | tags: | 39 | type=match,pattern=(.*)-r,group=1 40 | type=ref,event=pr 41 | type=edge 42 | labels: | 43 | org.opencontainers.image.title=n8n 44 | org.opencontainers.image.description=Workflow Automation Tool 45 | org.opencontainers.image.vendor=CrazyMax 46 | - 47 | name: Set up QEMU 48 | uses: docker/setup-qemu-action@v2 49 | - 50 | name: Set up Docker Buildx 51 | uses: docker/setup-buildx-action@v2 52 | - 53 | name: Login to DockerHub 54 | if: github.event_name != 'pull_request' 55 | uses: docker/login-action@v2 56 | with: 57 | username: ${{ secrets.DOCKER_USERNAME }} 58 | password: ${{ secrets.DOCKER_PASSWORD }} 59 | - 60 | name: Login to GHCR 61 | if: github.event_name != 'pull_request' 62 | uses: docker/login-action@v2 63 | with: 64 | registry: ghcr.io 65 | username: ${{ github.repository_owner }} 66 | password: ${{ secrets.GITHUB_TOKEN }} 67 | - 68 | name: Build 69 | uses: docker/bake-action@v3 70 | with: 71 | files: | 72 | ./docker-bake.hcl 73 | ${{ steps.meta.outputs.bake-file }} 74 | targets: image-all 75 | push: ${{ github.event_name != 'pull_request' }} 76 | - 77 | name: Check manifest 78 | if: github.event_name != 'pull_request' 79 | run: | 80 | docker buildx imagetools inspect ${{ env.DOCKERHUB_SLUG }}:${{ steps.meta.outputs.version }} 81 | docker buildx imagetools inspect ${{ env.GHCR_SLUG }}:${{ steps.meta.outputs.version }} 82 | - 83 | name: Inspect image 84 | if: github.event_name != 'pull_request' 85 | run: | 86 | docker pull ${{ env.DOCKERHUB_SLUG }}:${{ steps.meta.outputs.version }} 87 | docker image inspect ${{ env.DOCKERHUB_SLUG }}:${{ steps.meta.outputs.version }} 88 | docker pull ${{ env.GHCR_SLUG }}:${{ steps.meta.outputs.version }} 89 | docker image inspect ${{ env.GHCR_SLUG }}:${{ steps.meta.outputs.version }} 90 | -------------------------------------------------------------------------------- /.github/workflows/labels.yml: -------------------------------------------------------------------------------- 1 | name: labels 2 | 3 | concurrency: 4 | group: ${{ github.workflow }}-${{ github.ref }} 5 | cancel-in-progress: true 6 | 7 | on: 8 | push: 9 | branches: 10 | - 'master' 11 | paths: 12 | - '.github/labels.yml' 13 | - '.github/workflows/labels.yml' 14 | pull_request: 15 | paths: 16 | - '.github/labels.yml' 17 | - '.github/workflows/labels.yml' 18 | 19 | jobs: 20 | labeler: 21 | runs-on: ubuntu-latest 22 | steps: 23 | - 24 | name: Checkout 25 | uses: actions/checkout@v3 26 | - 27 | name: Run Labeler 28 | uses: crazy-max/ghaction-github-labeler@v4 29 | with: 30 | dry-run: ${{ github.event_name == 'pull_request' }} 31 | -------------------------------------------------------------------------------- /.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | name: test 2 | 3 | concurrency: 4 | group: ${{ github.workflow }}-${{ github.ref }} 5 | cancel-in-progress: true 6 | 7 | on: 8 | push: 9 | branches: 10 | - 'master' 11 | paths-ignore: 12 | - '**.md' 13 | pull_request: 14 | paths-ignore: 15 | - '**.md' 16 | 17 | env: 18 | BUILD_TAG: n8n:test 19 | CONTAINER_NAME: n8n 20 | 21 | jobs: 22 | test: 23 | runs-on: ubuntu-latest 24 | steps: 25 | - 26 | name: Checkout 27 | uses: actions/checkout@v3 28 | - 29 | name: Set up QEMU 30 | uses: docker/setup-qemu-action@v2 31 | - 32 | name: Set up Docker Buildx 33 | uses: docker/setup-buildx-action@v2 34 | - 35 | name: Build 36 | uses: docker/bake-action@v3 37 | with: 38 | targets: image-local 39 | env: 40 | DEFAULT_TAG: ${{ env.BUILD_TAG }} 41 | - 42 | name: Start 43 | run: | 44 | docker compose up -d 45 | working-directory: test 46 | env: 47 | N8N_IMAGE: ${{ env.BUILD_TAG }} 48 | N8N_CONTAINER: ${{ env.CONTAINER_NAME }} 49 | - 50 | name: Check container logs 51 | uses: crazy-max/.github/.github/actions/container-logs-check@main 52 | with: 53 | container_name: ${{ env.CONTAINER_NAME }} 54 | log_check: "Editor is now accessible via" 55 | timeout: 120 56 | - 57 | name: Logs 58 | if: always() 59 | run: | 60 | docker compose logs 61 | working-directory: test 62 | env: 63 | N8N_IMAGE: ${{ env.BUILD_TAG }} 64 | N8N_CONTAINER: ${{ env.CONTAINER_NAME }} 65 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## 0.236.1-r0 (2023/07/17) 4 | 5 | * n8n 0.236.1 (#21) 6 | 7 | ## 0.133.0-r0 (2021/08/15) 8 | 9 | * n8n 0.133.0 10 | 11 | ## 0.129.0-r0 (2021/07/14) 12 | 13 | * n8n 0.129.0 14 | 15 | ## 0.124.1-r0 (2021/06/18) 16 | 17 | * n8n 0.124.1 18 | 19 | ## 0.121.0-r0 (2021/05/28) 20 | 21 | * n8n 0.121.0 22 | 23 | ## 0.119.0-r0 (2021/05/11) 24 | 25 | * n8n 0.119.0 26 | 27 | ## 0.118.1-r0 (2021/05/07) 28 | 29 | * n8n 0.118.1 30 | 31 | ## 0.117.0-r0 (2021/04/25) 32 | 33 | * n8n 0.117.0 34 | 35 | ## 0.115.0-r0 (2021/04/15) 36 | 37 | * n8n 0.115.0 38 | 39 | ## 0.114.0-r0 (2021/04/05) 40 | 41 | * Initial version based on [n8n](https://github.com/n8n-io/n8n) 0.114.0 42 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | # syntax=docker/dockerfile:1 2 | 3 | ARG N8N_VERSION=0.236.1 4 | ARG NODE_VERSION=18 5 | 6 | FROM node:${NODE_VERSION}-alpine 7 | RUN apk --update --no-cache add \ 8 | ca-certificates \ 9 | graphicsmagick \ 10 | libc6-compat \ 11 | libressl \ 12 | openssh \ 13 | shadow \ 14 | tzdata \ 15 | && apk --no-cache add --virtual fonts \ 16 | fonts \ 17 | fontconfig \ 18 | msttcorefonts-installer \ 19 | && update-ms-fonts \ 20 | && fc-cache -f \ 21 | && addgroup -g 1500 n8n \ 22 | && adduser -u 1500 -G n8n -h /data -s /bin/sh -D n8n \ 23 | && npm_config_user=n8n npm install -g full-icu \ 24 | && apk del fonts \ 25 | && rm -rf /tmp/* 26 | 27 | WORKDIR /app 28 | ARG N8N_VERSION 29 | RUN apk --update --no-cache add --virtual .build \ 30 | build-base \ 31 | git \ 32 | python3 \ 33 | && npm_config_user=n8n npm install --omit=dev n8n@${N8N_VERSION} \ 34 | && chown -R n8n. /app \ 35 | && apk del .build \ 36 | && rm -rf /root /tmp/* \ 37 | && mkdir /root 38 | 39 | USER n8n 40 | 41 | ENV TZ="UTC" \ 42 | NODE_ICU_DATA="/usr/local/lib/node_modules/full-icu" \ 43 | DATA_FOLDER="/data" 44 | 45 | VOLUME [ "/data" ] 46 | EXPOSE 5678 47 | 48 | ENTRYPOINT [ "node", "/app/node_modules/n8n/bin/n8n" ] 49 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022-2024 CrazyMax 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
2 | 3 | 11 | 12 | ## About 13 | 14 | Docker image for [n8n](https://github.com/n8n-io/n8n), a workflow automation 15 | tool. Easily automate tasks across different services. 16 | 17 | > [!TIP] 18 | > Want to be notified of new releases? Check out 🔔 [Diun (Docker Image Update Notifier)](https://github.com/crazy-max/diun) 19 | > project! 20 | 21 | ___ 22 | 23 | * [Build locally](#build-locally) 24 | * [Image](#image) 25 | * [Environment variables](#environment-variables) 26 | * [Ports](#ports) 27 | * [Usage](#usage) 28 | * [Upgrade](#upgrade) 29 | * [Contributing](#contributing) 30 | * [License](#license) 31 | 32 | ## Build locally 33 | 34 | ```shell 35 | git clone https://github.com/crazy-max/docker-n8n.git 36 | cd docker-n8n 37 | 38 | # Build image and output to docker (default) 39 | docker buildx bake 40 | 41 | # Build multi-platform image 42 | docker buildx bake image-all 43 | ``` 44 | 45 | ## Image 46 | 47 | | Registry | Image | 48 | |--------------------------------------------------------------------------------------------------|---------------------------------| 49 | | [Docker Hub](https://hub.docker.com/r/crazymax/n8n/) | `crazymax/n8n` | 50 | | [GitHub Container Registry](https://github.com/users/crazy-max/packages/container/package/n8n) | `ghcr.io/crazy-max/n8n` | 51 | 52 | Following platforms for this image are available: 53 | 54 | ``` 55 | $ docker run --rm mplatform/mquery crazymax/n8n:latest 56 | Image: crazymax/n8n:latest 57 | * Manifest List: Yes 58 | * Supported platforms: 59 | - linux/amd64 60 | - linux/arm/v7 61 | - linux/arm64 62 | ``` 63 | 64 | ## Environment variables 65 | 66 | * `TZ`: The timezone assigned to the container (default `UTC`) 67 | 68 | To configure the application, just add the environment variables as shown in the official 69 | [Configuration page](https://docs.n8n.io/reference/configuration.html) of n8n. 70 | 71 | ## Ports 72 | 73 | * `5678`: HTTP port 74 | 75 | ## Usage 76 | 77 | ### Docker Compose 78 | 79 | Docker compose is the recommended way to run this image. You can use the following 80 | [docker compose template](examples/compose/compose.yml), then run the container: 81 | 82 | ```bash 83 | docker compose up -d 84 | docker compose logs -f 85 | ``` 86 | 87 | ### Command line 88 | 89 | You can also use the following minimal command: 90 | 91 | ```shell 92 | docker run -d -p 5678:5678 --name n8n \ 93 | -e "TZ=Europe/Paris" \ 94 | -e "GENERIC_TIMEZONE=Europe/Paris" \ 95 | -v $(pwd)/data:/data \ 96 | crazymax/n8n:latest 97 | ``` 98 | 99 | ## Upgrade 100 | 101 | To upgrade, pull the newer image and launch the container : 102 | 103 | ```bash 104 | docker compose pull 105 | docker compose up -d 106 | ``` 107 | 108 | ## Contributing 109 | 110 | Want to contribute? Awesome! The most basic way to show your support is to star 111 | the project, or to raise issues. You can also support this project by [**becoming a sponsor on GitHub**](https://github.com/sponsors/crazy-max) 112 | or by making a [PayPal donation](https://www.paypal.me/crazyws) to ensure this 113 | journey continues indefinitely! 114 | 115 | Thanks again for your support, it is much appreciated! :pray: 116 | 117 | ## License 118 | 119 | MIT. See `LICENSE` for more details. 120 | -------------------------------------------------------------------------------- /docker-bake.hcl: -------------------------------------------------------------------------------- 1 | variable "DEFAULT_TAG" { 2 | default = "n8n:local" 3 | } 4 | 5 | // Special target: https://github.com/docker/metadata-action#bake-definition 6 | target "docker-metadata-action" { 7 | tags = ["${DEFAULT_TAG}"] 8 | } 9 | 10 | // Default target if none specified 11 | group "default" { 12 | targets = ["image-local"] 13 | } 14 | 15 | target "image" { 16 | inherits = ["docker-metadata-action"] 17 | } 18 | 19 | target "image-local" { 20 | inherits = ["image"] 21 | output = ["type=docker"] 22 | } 23 | 24 | target "image-all" { 25 | inherits = ["image"] 26 | platforms = [ 27 | "linux/amd64", 28 | "linux/arm/v7", 29 | "linux/arm64" 30 | ] 31 | } 32 | -------------------------------------------------------------------------------- /examples/compose/.env: -------------------------------------------------------------------------------- 1 | TZ=Europe/Paris 2 | -------------------------------------------------------------------------------- /examples/compose/compose.yml: -------------------------------------------------------------------------------- 1 | services: 2 | n8n: 3 | image: crazymax/n8n:latest 4 | container_name: n8n 5 | ports: 6 | - target: 5678 7 | published: 5678 8 | protocol: tcp 9 | volumes: 10 | - "n8n:/data" 11 | environment: 12 | - "TZ" 13 | - "GENERIC_TIMEZONE=${TZ}" 14 | restart: always 15 | 16 | volumes: 17 | n8n: 18 | -------------------------------------------------------------------------------- /examples/traefik/.env: -------------------------------------------------------------------------------- 1 | TZ=Europe/Paris 2 | 3 | N8N_BASIC_AUTH_USER=n8n 4 | N8N_BASIC_AUTH_PASSWORD=n8n 5 | -------------------------------------------------------------------------------- /examples/traefik/README.md: -------------------------------------------------------------------------------- 1 | ## Usage 2 | 3 | ```bash 4 | touch acme.json 5 | chmod 600 acme.json 6 | docker compose up -d 7 | docker compose logs -f 8 | ``` 9 | -------------------------------------------------------------------------------- /examples/traefik/compose.yml: -------------------------------------------------------------------------------- 1 | services: 2 | traefik: 3 | image: traefik:2.5 4 | container_name: traefik 5 | command: 6 | - "--global.checknewversion=false" 7 | - "--global.sendanonymoususage=false" 8 | - "--log=true" 9 | - "--log.level=INFO" 10 | - "--entrypoints.http=true" 11 | - "--entrypoints.http.address=:80" 12 | - "--entrypoints.http.http.redirections.entrypoint.to=https" 13 | - "--entrypoints.http.http.redirections.entrypoint.scheme=https" 14 | - "--entrypoints.https=true" 15 | - "--entrypoints.https.address=:443" 16 | - "--certificatesresolvers.letsencrypt" 17 | - "--certificatesresolvers.letsencrypt.acme.storage=acme.json" 18 | - "--certificatesresolvers.letsencrypt.acme.email=webmaster@example.com" 19 | - "--certificatesresolvers.letsencrypt.acme.httpchallenge" 20 | - "--certificatesresolvers.letsencrypt.acme.httpchallenge.entrypoint=http" 21 | - "--providers.docker" 22 | - "--providers.docker.watch=true" 23 | - "--providers.docker.exposedbydefault=false" 24 | ports: 25 | - target: 80 26 | published: 80 27 | protocol: tcp 28 | - target: 443 29 | published: 443 30 | protocol: tcp 31 | volumes: 32 | - "./acme.json:/acme.json" 33 | - "/var/run/docker.sock:/var/run/docker.sock" 34 | environment: 35 | - "TZ" 36 | restart: always 37 | 38 | n8n: 39 | image: crazymax/n8n:latest 40 | container_name: n8n 41 | volumes: 42 | - "n8n:/data" 43 | labels: 44 | - "traefik.enable=true" 45 | - "traefik.http.routers.healthchecks.entrypoints=https" 46 | - "traefik.http.routers.healthchecks.rule=Host(`n8n.example.com`)" 47 | - "traefik.http.routers.healthchecks.tls=true" 48 | - "traefik.http.routers.healthchecks.tls.certresolver=letsencrypt" 49 | - "traefik.http.routers.healthchecks.tls.domains[0].main=n8n.example.com" 50 | - "traefik.http.services.healthchecks.loadbalancer.server.port=5678" 51 | environment: 52 | - "TZ" 53 | - "GENERIC_TIMEZONE=${TZ}" 54 | - "N8N_BASIC_AUTH_ACTIVE=true" 55 | - "N8N_BASIC_AUTH_USER" 56 | - "N8N_BASIC_AUTH_PASSWORD" 57 | - "N8N_HOST=n8n.example.com" 58 | - "N8N_PROTOCOL=https" 59 | - "NODE_ENV=production" 60 | - "WEBHOOK_TUNNEL_URL=https://n8n.example.com/" 61 | restart: always 62 | 63 | volumes: 64 | n8n: 65 | -------------------------------------------------------------------------------- /test/.env: -------------------------------------------------------------------------------- 1 | TZ=Europe/Paris 2 | -------------------------------------------------------------------------------- /test/compose.yml: -------------------------------------------------------------------------------- 1 | services: 2 | n8n: 3 | image: ${N8N_IMAGE:-crazymax/n8n} 4 | container_name: ${N8N_CONTAINER:-n8n} 5 | networks: 6 | - n8n 7 | ports: 8 | - target: 5678 9 | published: 5678 10 | protocol: tcp 11 | volumes: 12 | - "n8n:/data" 13 | environment: 14 | - "TZ" 15 | - "GENERIC_TIMEZONE=${TZ}" 16 | restart: always 17 | 18 | volumes: 19 | n8n: 20 | 21 | networks: 22 | n8n: 23 | name: n8n 24 | --------------------------------------------------------------------------------