Initial Commit
This commit is contained in:
56
.gitea/workflows/docker-build.yml
Normal file
56
.gitea/workflows/docker-build.yml
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
name: Build and Push to Gitea Registry
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [master]
|
||||||
|
tags: ['v*']
|
||||||
|
pull_request:
|
||||||
|
branches: [master]
|
||||||
|
|
||||||
|
env:
|
||||||
|
REGISTRY: ${{ gitea.server_url }}
|
||||||
|
IMAGE_NAME: ${{ gitea.repository }}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-push:
|
||||||
|
runs-on: docker
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
packages: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Log in to Gitea Registry
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: ${{ env.REGISTRY }}
|
||||||
|
username: ${{ gitea.actor }}
|
||||||
|
password: ${{ secrets.TOKEN }}
|
||||||
|
|
||||||
|
- name: Extract metadata for Docker
|
||||||
|
id: meta
|
||||||
|
uses: docker/metadata-action@v5
|
||||||
|
with:
|
||||||
|
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||||
|
tags: |
|
||||||
|
type=ref,event=branch
|
||||||
|
type=ref,event=pr
|
||||||
|
type=semver,pattern={{version}}
|
||||||
|
type=semver,pattern={{major}}.{{minor}}
|
||||||
|
type=sha
|
||||||
|
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}
|
||||||
|
|
||||||
|
- name: Build and push Docker image
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
cache-from: type=gha
|
||||||
|
cache-to: type=gha,mode=max
|
||||||
12
Dockerfile
Normal file
12
Dockerfile
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
FROM docker.n8n.io/n8nio/n8n:latest
|
||||||
|
|
||||||
|
USER root
|
||||||
|
|
||||||
|
RUN sed -i "s/getValue(feature) {/getValue(feature) {return undefined;/g" /usr/local/lib/node_modules/n8n/dist/license.js && \
|
||||||
|
|
||||||
|
sed -i "s/isAPIDisabled() {/isAPIDisabled() {return false;/g" /usr/local/lib/node_modules/n8n/dist/license.js && \
|
||||||
|
sed -i "s/isLicensed(feature) {/isLicensed(feature) {if (feature == 'feat\:showNonProdBanner') {return false} else {return true};/g" /usr/local/lib/node_modules/n8n/dist/license.js && \
|
||||||
|
sed -i "s/getPlanName() {/getPlanName() {return 'Entreprise';/g" /usr/local/lib/node_modules/n8n/dist/license.js && \
|
||||||
|
sed -i "s/async renew() {/async renew() {return;/g" /usr/local/lib/node_modules/n8n/dist/license.js
|
||||||
|
|
||||||
|
USER node
|
||||||
8
docker-compose.yml
Normal file
8
docker-compose.yml
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
services:
|
||||||
|
n8n:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
image: docker.ibaraki.app/crack/n8n:latest
|
||||||
|
ports:
|
||||||
|
- "5678:5678"
|
||||||
Reference in New Issue
Block a user