colbymchenry/n8n-gcp-firebase là dự án Shell với 8 sao. Deploy an n8n instance to Cloud Run
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
A Neon PostgreSQL account and database (or other PostgreSQL provider)
(Optional) Firebase project for Firebase integration
Creating a New Project
Clone this repository:
git clone https://github.com/yourusername/n8n-gcp-firebase.git
cd n8n-gcp-firebase
Make the setup script executable:
chmod +x main.sh
Run the setup script with your desired project name:
./main.sh my-n8n-project
The script will prompt you for:
n8n username and password
Neon PostgreSQL database details
(Optional) Firebase configuration if you want to integrate with Firebase
After completion, you'll have a new directory with your project name containing:
docker-compose.yml
Dockerfile (if Firebase integration was selected)
.env file with your configuration
README.md with project-specific instructions
Running Locally
Navigate to your project directory:
cd my-n8n-project
Copy the docker.sh script to your project directory:
cp ../docker.sh .
Make the docker script executable:
chmod +x docker.sh
Start n8n using the provided docker script:
./docker.sh
Access n8n at http://localhost:5678 and log in using the credentials you provided during setup.
Cloud Run Deployment
Cloud Prerequisites
Google Cloud account with billing enabled
Google Cloud CLI (gcloud) installed
Docker installed
Neon PostgreSQL database (or other PostgreSQL provider)
Setting Up Google Cloud
Install the Google Cloud CLI if you haven't already:
# For macOS (using Homebrew)
brew install --cask google-cloud-sdk
# For Ubuntu/Debian
echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -
sudo apt-get update && sudo apt-get install google-cloud-sdk
# For other operating systems, see: https://cloud.google.com/sdk/docs/install
Initialize and log in to Google Cloud:
gcloud init
Follow the prompts to log in and select your Google Cloud project.
Enable billing for your project (required for Cloud Run):
gcloud billing projects link YOUR_PROJECT_ID --billing-account=YOUR_BILLING_ACCOUNT_ID
You can find your billing account ID with gcloud billing accounts list.
Deploying to Cloud Run
Make sure you're in the repository root directory (not inside your project folder):
cd /path/to/n8n-gcp-firebase
Make the deployment script executable:
chmod +x deploy-cloud-run.sh
Run the deployment script:
./deploy-cloud-run.sh
Follow the script prompts to configure your deployment:
Select your existing project directory
Choose your GCP project and region
Configure CPU, memory, and scaling options
(Optional) Specify a custom domain
After deployment completes, you'll receive:
The URL of your n8n instance
Your n8n username and password
The encryption key (save this for future deployments)
Webhook configuration details
Webhook Configuration
When deploying to Cloud Run, webhooks require special configuration due to the serverless nature of the platform. The deploy-cloud-run.sh script handles this automatically by setting:
WEBHOOK_URL: The complete URL to your Cloud Run service
N8N_HOST: The hostname of your Cloud Run service
N8N_PROTOCOL: Set to "https" (always use HTTPS with Cloud Run)
N8N_SKIP_WEBHOOK_DEREGISTRATION_SHUTDOWN: Set to "true" to maintain webhooks during scaling
After deploying to Cloud Run, you may need to:
Log in to your n8n instance
Recreate any webhook workflows to ensure proper registration
Test your webhooks using the provided curl commands
Troubleshooting
Webhook Issues
If webhooks aren't working after deployment:
Verify environment variables with:
gcloud run services describe YOUR_SERVICE_NAME --region=YOUR_REGION --format='value(spec.template.spec.containers[0].env)'
Update environment variables if needed:
gcloud run services update YOUR_SERVICE_NAME --region=YOUR_REGION \
--set-env-vars="WEBHOOK_URL=https://your-service-url.a.run.app,N8N_HOST=your-service-url.a.run.app,N8N_PROTOCOL=https,N8N_SKIP_WEBHOOK_DEREGISTRATION_SHUTDOWN=true"
Check logs:
gcloud run logs read YOUR_SERVICE_NAME --region=YOUR_REGION --limit=50
Cold Start Issues
If you're experiencing slow response times or webhook failures due to cold starts:
Update your Cloud Run service to maintain at least one instance:
gcloud run services update YOUR_SERVICE_NAME --region=YOUR_REGION --min-instances=1
Note: This will prevent scaling to zero and increase costs.
Database Connection Issues
Ensure your Neon PostgreSQL database (or other provider):
Has the correct IP allowlist settings for Cloud Run
Has SSL properly configured
Has the correct database user permissions
Firebase Integration
This setup supports Firebase integration with n8n, allowing you to use Firebase services (Firestore, Authentication, etc.) in your n8n workflows.
Setting Up Firebase
Create a Firebase project at firebase.google.com
Generate a new private key for your service account:
Go to Project Settings > Service Accounts
Click "Generate New Private Key"
Save the JSON file
During the main.sh script execution, select "Yes" when asked about Firebase integration
Enter the Firebase credentials from your service account JSON:
Project ID
Private Key ID
Private Key (formatted with \n for newlines)
Client Email
Client ID
Client X509 Cert URL
Using Firebase in n8n Workflows
When creating n8n workflows with Firebase, use the Function node with this template:
const admin = require('firebase-admin');
// Create service account from environment variables
const serviceAccount = {
"type": "service_account",
"project_id": process.env.FIREBASE_PROJECT_ID,
"private_key_id": process.env.FIREBASE_PRIVATE_KEY_ID,
"private_key": process.env.FIREBASE_PRIVATE_KEY.replace(/\\n/g, '\n'),
"client_email": process.env.FIREBASE_CLIENT_EMAIL,
"client_id": process.env.FIREBASE_CLIENT_ID,
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"client_x509_cert_url": process.env.FIREBASE_CLIENT_X509_CERT_URL
};
// Initialize Firebase (only if not already initialized)
if (admin.apps.length === 0) {
admin.initializeApp({
credential: admin.credential.cert(serviceAccount)
});
}
// Example: Get Firestore document
const db = admin.firestore();
const docRef = db.collection('users').doc('user123');
const doc = await docRef.get();
if (doc.exists) {
// Document exists, return its data
return {
data: doc.data()
};
} else {
// Document doesn't exist
return {
data: { error: 'Document not found' }
};
}
This integration works both locally and when deployed to Cloud Run.
colbymchenry/n8n-gcp-firebase có 8 sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/colbymchenry/n8n-gcp-firebase. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
colbymchenry/n8n-gcp-firebase có phải mã nguồn mở không?
TopGit chưa ghi nhận license cho colbymchenry/n8n-gcp-firebase. Phần lớn repo public trên GitHub là mã nguồn mở, nhưng điều khoản khác nhau từng repo — mở file LICENSE để xác nhận.
colbymchenry/n8n-gcp-firebase còn đang phát triển không?
Commit gần nhất trên colbymchenry/n8n-gcp-firebase là 1.6 năm trước (theo timestamp GitHub). Repo có 4 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
colbymchenry/n8n-gcp-firebase là gì?
colbymchenry/n8n-gcp-firebase (colbymchenry/n8n-gcp-firebase) là dự án Shell trên GitHub. Theo mô tả gốc: Deploy an n8n instance to Cloud Run
colbymchenry/n8n-gcp-firebase viết bằng ngôn ngữ gì?
colbymchenry/n8n-gcp-firebase chủ yếu viết bằng Shell. Trường "language" của GitHub dựa trên phần lớn byte ở nhánh mặc định.
Đọc thêm về colbymchenry/n8n-gcp-firebase ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/colbymchenry/n8n-gcp-firebase là nguồn chính thức.
Đọc đầy đủ README ở tab phía trên.
Chưa chắc n8n-gcp-firebase có hợp với bạn?
Để ChatGPT, Claude hoặc Perplexity tìm hiểu giúp — bấm bên dưới và xem AI nói gì về n8n-gcp-firebase.