Skip to content

Commit 7612ec0

Browse files
committed
Update environment configuration for MN Service credentials in n8n
- Added new environment variables for Sembly and Google Service Account credentials in . - Updated to include new MN Service environment variables for seamless integration. - Modified to install the package and updated the external modules allowlist. These changes improve the n8n service by providing required credentials for MN Service integration and enhancing security with the addition of the package.
1 parent 0dc0722 commit 7612ec0

File tree

3 files changed

+33
-2
lines changed

3 files changed

+33
-2
lines changed

.env.example

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,21 @@ N8N_SMTP_PASS=
7777
N8N_SMTP_SENDER=
7878
N8N_SMTP_SSL=false
7979
N8N_SMTP_TLS=true
80+
81+
# MN Service credentials
82+
## Sembly credentials
83+
SEMBLY_USER=sembly_user
84+
SEMBLY_PASS=sembly_pass
85+
86+
## MN Service — Google Service Account (SA)
87+
MN_SERVICE_SA_GOOGLE_TYPE=service_account
88+
MN_SERVICE_SA_GOOGLE_PROJECT_ID=mock-project-id
89+
MN_SERVICE_SA_GOOGLE_PRIVATE_KEY_ID=mock-private-key-id
90+
MN_SERVICE_SA_GOOGLE_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\nMOCK_PRIVATE_KEY_CONTENT\n-----END PRIVATE KEY-----\n"
91+
MN_SERVICE_SA_GOOGLE_CLIENT_EMAIL=mock-service-account@mock-project-id.iam.gserviceaccount.com
92+
MN_SERVICE_SA_GOOGLE_CLIENT_ID=000000000000000000000
93+
MN_SERVICE_SA_GOOGLE_AUTH_URI=https://accounts.google.com/o/oauth2/auth
94+
MN_SERVICE_SA_GOOGLE_TOKEN_URI=https://oauth2.googleapis.com/token
95+
MN_SERVICE_SA_GOOGLE_AUTH_PROVIDER_X509_CERT_URL=https://www.googleapis.com/oauth2/v1/certs
96+
MN_SERVICE_SA_GOOGLE_CLIENT_X509_CERT_URL=https://www.googleapis.com/robot/v1/metadata/x509/mock-service-account%40mock-project-id.iam.gserviceaccount.com
97+
MN_SERVICE_SA_GOOGLE_UNIVERSE_DOMAIN=googleapis.com

Dockerfile.n8n

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ ARG NODE_ENV=production
55
ARG N8N_PORT=5678
66
ARG SHOWDOWN_VERSION=^2.1.0
77
ARG SLACKIFY_MARKDOWN_VERSION=^4.5.0
8+
ARG CRYPTO_VERSION=^4.2.0
89

910
# Install git for backup script and other packages + install external packages in one layer
1011
USER root
@@ -14,11 +15,12 @@ RUN set -eux; \
1415
--legacy-peer-deps --no-workspaces \
1516
--unsafe-perm \
1617
showdown@${SHOWDOWN_VERSION} \
17-
slackify-markdown@${SLACKIFY_MARKDOWN_VERSION} && \
18+
slackify-markdown@${SLACKIFY_MARKDOWN_VERSION} \
19+
crypto-js@${CRYPTO_VERSION} && \
1820
npm cache clean --force
1921

2022
# Configure external modules allowlist used by Code/Function nodes
21-
ENV NODE_FUNCTION_ALLOW_EXTERNAL="showdown,slackify-markdown"
23+
ENV NODE_FUNCTION_ALLOW_EXTERNAL="showdown,slackify-markdown,crypto-js"
2224

2325
# Create app directory
2426
WORKDIR /home/node

docker-compose.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,17 @@ services:
3434
- N8N_LOG_LEVEL=debug
3535
- N8N_LOG_OUTPUT=console
3636
- TZ=${TZ:-America/New_York}
37+
- MN_SERVICE_SA_GOOGLE_TYPE=${MN_SERVICE_SA_GOOGLE_TYPE:-GOOGLE_TYPE}
38+
- MN_SERVICE_SA_GOOGLE_PROJECT_ID=${MN_SERVICE_SA_GOOGLE_PROJECT_ID:-PROJECT_ID}
39+
- MN_SERVICE_SA_GOOGLE_PRIVATE_KEY_ID=${MN_SERVICE_SA_GOOGLE_PRIVATE_KEY_ID:-PRIVATE_KEY_ID}
40+
- MN_SERVICE_SA_GOOGLE_PRIVATE_KEY=${MN_SERVICE_SA_GOOGLE_PRIVATE_KEY:-PRIVATE_KEY}
41+
- MN_SERVICE_SA_GOOGLE_CLIENT_EMAIL=${MN_SERVICE_SA_GOOGLE_CLIENT_EMAIL:-CLIENT_EMAIL}
42+
- MN_SERVICE_SA_GOOGLE_CLIENT_ID=${MN_SERVICE_SA_GOOGLE_CLIENT_ID:-CLIENT_ID}
43+
- MN_SERVICE_SA_GOOGLE_AUTH_URI=${MN_SERVICE_SA_GOOGLE_AUTH_URI:-AUTH_URI}
44+
- MN_SERVICE_SA_GOOGLE_TOKEN_URI=${MN_SERVICE_SA_GOOGLE_TOKEN_URI:-TOKEN_URI}
45+
- MN_SERVICE_SA_GOOGLE_AUTH_PROVIDER_X509_CERT_URL=${MN_SERVICE_SA_GOOGLE_AUTH_PROVIDER_X509_CERT_URL:-CERT_URL}
46+
- MN_SERVICE_SA_GOOGLE_CLIENT_X509_CERT_URL=${MN_SERVICE_SA_GOOGLE_CLIENT_X509_CERT_URL:-CLIENT_CERT_URL}
47+
- MN_SERVICE_SA_GOOGLE_UNIVERSE_DOMAIN=${MN_SERVICE_SA_GOOGLE_UNIVERSE_DOMAIN:-UNIVERSE_DOMAIN}
3748
volumes:
3849
- n8n_data:/home/node/.n8n
3950
- ./scripts:/home/node/scripts

0 commit comments

Comments
 (0)