Add Dockerfile and readme
Some checks failed
Build Pipeline for de.captica.n8n / Publish Docker (push) Failing after 1m44s
Some checks failed
Build Pipeline for de.captica.n8n / Publish Docker (push) Failing after 1m44s
This commit is contained in:
9
.gitea/workflows/pipeline-build.yaml
Normal file
9
.gitea/workflows/pipeline-build.yaml
Normal file
@@ -0,0 +1,9 @@
|
||||
name: Build Pipeline for de.captica.n8n
|
||||
run-name: ${{ gitea.actor }} pushed new changes to ${{ gitea.branch }}
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
Publish Docker:
|
||||
uses: captica-oss/de.captica.expert.devops/.gitea/workflows/publish-docker.yaml@main
|
||||
secrets: inherit
|
||||
26
Dockerfile
Normal file
26
Dockerfile
Normal file
@@ -0,0 +1,26 @@
|
||||
FROM node:22-slim
|
||||
|
||||
|
||||
|
||||
# Update everything and install needed dependencies
|
||||
RUN apt-get update -y && \
|
||||
apt-get upgrade -y && \
|
||||
apt-get install -y -q graphicsmagick tzdata build-dependencies python build-base ca-certificates && \
|
||||
useradd -r -U -d /opt/captica/${NAME_APPLICATION} -c "captica Service User" -m captica
|
||||
|
||||
# # Set a custom user to not have n8n run as root
|
||||
USER captica
|
||||
|
||||
# Install n8n and the also temporary all the packages
|
||||
# it needs to build it correctly.
|
||||
RUN N8N_VERSION=$(curl -s https://api.github.com/repos/n8n-io/n8n/releases/latest | jq -r '.tag_name' | sed 's/^v//') && \
|
||||
echo "Latest n8n version: ${N8N_VERSION}" && \
|
||||
npm_config_user=root npm install -g {N8N_VERSION} && \
|
||||
apt-get remove build-dependencies build-base && \
|
||||
apt-get autoremove -y && \
|
||||
apt-get autoclean -y
|
||||
|
||||
|
||||
WORKDIR /data
|
||||
|
||||
CMD ["n8n"]
|
||||
45
README.md
45
README.md
@@ -1,3 +1,46 @@
|
||||
# de.captica.n8n
|
||||
|
||||
Customize n8n installation
|
||||
This project contains a Dockerfile to build a Docker image for [n8n](https://n8n.io/), a free and open-source node-based workflow automation tool.
|
||||
|
||||
The original image of n8n is based on an alpine image which has some unusable tools
|
||||
|
||||
## Table of Contents
|
||||
|
||||
- [Prerequisites](#prerequisites)
|
||||
- [Building the Docker Image](#building-the-docker-image)
|
||||
- [Running the Docker Container](#running-the-docker-container)
|
||||
- [Customizing the Docker Image](#customizing-the-docker-image)
|
||||
- [License](#license)
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- Docker installed on your system
|
||||
- Access to a Docker registry (optional)
|
||||
|
||||
## Building the Docker Image
|
||||
|
||||
To build the Docker image, navigate to the project directory and run the following command:
|
||||
|
||||
```bash
|
||||
docker build -t de.captica.n8n .
|
||||
```
|
||||
This will build the Docker image using the Dockerfile in the current directory.
|
||||
|
||||
## Running the Docker Container
|
||||
|
||||
### To run the Docker container, use the following command
|
||||
|
||||
```bash
|
||||
docker run -d -p 5678:5678 --name n8n de.captica.n8n
|
||||
```
|
||||
|
||||
This will start a detached Docker container named "n8n" and expose port 5678 on your host machine. You can access n8n at http://localhost:5678 in your browser.
|
||||
|
||||
### Customizing the Docker Image
|
||||
To customize the Docker image, you can modify the Dockerfile and rebuild the image. Here are some examples of customizations you might consider:
|
||||
1. Add custom workflows: Copy your workflows into the /data directory in the Dockerfile.
|
||||
2. Set environment variables: Use the ENV directive in the Dockerfile to set environment variables for n8n.
|
||||
3. Install additional packages: Use the RUN directive to install additional packages using apt-get or npm.
|
||||
|
||||
## License
|
||||
This project is licensed under the MIT License. See the LICENSE file for more information.
|
||||
|
||||
Reference in New Issue
Block a user