mirror of
https://github.com/preparebuddyy/n8n-self-hosted.git
synced 2026-03-02 22:47:01 +00:00
add external network and services
This commit is contained in:
27
README.md
27
README.md
@@ -30,21 +30,27 @@ This repository provides a Docker Compose setup for running a self-hosted n8n in
|
||||
cd n8n-self-hosted
|
||||
```
|
||||
|
||||
2. **Configure the environment:**
|
||||
2. **Create the shared network:**
|
||||
This setup uses a shared network to easily connect to external databases. If you haven't already, create the network:
|
||||
```bash
|
||||
docker network create shared_network
|
||||
```
|
||||
|
||||
3. **Configure the environment:**
|
||||
Open the `.env` file and update the variables with your own settings.
|
||||
|
||||
3. **Start the application:**
|
||||
4. **Start the application:**
|
||||
```bash
|
||||
./start-docker.sh
|
||||
```
|
||||
This will start all the services in detached mode and scale the `n8n-worker` service to 2 replicas.
|
||||
|
||||
4. **Restart the application:**
|
||||
5. **Restart the application:**
|
||||
```bash
|
||||
./restart-docker.sh
|
||||
```
|
||||
|
||||
5. **Update the application:**
|
||||
6. **Update the application:**
|
||||
```bash
|
||||
./update-docker.sh
|
||||
```
|
||||
@@ -60,6 +66,17 @@ To create a backup, run:
|
||||
```
|
||||
This will create a compressed SQL dump of your PostgreSQL database in the `local_files/backups/` directory. It is recommended to run this script regularly (e.g., using a cron job).
|
||||
|
||||
## Connecting to External Databases
|
||||
|
||||
This n8n setup is part of a larger ecosystem of self-hosted services that can all run on the same `shared_network`. This allows n8n to securely connect to them using their container names as hostnames.
|
||||
|
||||
Check out these pre-configured databases that work out-of-the-box with this n8n instance:
|
||||
|
||||
- [**postgresql-self-hosted**](https://github.com/AiratTop/postgresql-self-hosted): A simple and robust PostgreSQL setup.
|
||||
- [**mysql-self-hosted**](https://github.com/AiratTop/mysql-self-hosted): A self-hosted MySQL instance.
|
||||
- [**clickhouse-self-hosted**](https://github.com/AiratTop/clickhouse-self-hosted): High-performance columnar database for analytics.
|
||||
- [**qdrant-self-hosted**](https://github.com/AiratTop/qdrant-self-hosted): A vector database for AI applications.
|
||||
|
||||
## Services
|
||||
|
||||
- `caddy`: Reverse proxy
|
||||
@@ -80,4 +97,4 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
|
||||
|
||||
- Website: [airat.top](https://airat.top)
|
||||
- GitHub: [@AiratTop](https://github.com/AiratTop)
|
||||
- Repository: [n8n-self-hosted](https://github.com/AiratTop/n8n-self-hosted)
|
||||
- Repository: [n8n-self-hosted](https://github.com/AiratTop/n8n-self-hosted)
|
||||
|
||||
@@ -9,4 +9,4 @@ BACKUP_DIR="local_files/backups"
|
||||
mkdir -p "${BACKUP_DIR}"
|
||||
|
||||
# Dump the PostgreSQL database and compress it.
|
||||
docker-compose exec -T n8n-psql pg_dump -U n8n -d n8n_db | gzip > "${BACKUP_DIR}/psql_n8ndb_$(date +%F_%H-%M-%S).sql.gz"
|
||||
docker compose exec -T n8n-psql pg_dump -U n8n -d n8n_db | gzip > "${BACKUP_DIR}/psql_n8ndb_$(date +%F_%H-%M-%S).sql.gz"
|
||||
|
||||
@@ -148,4 +148,5 @@ services:
|
||||
networks:
|
||||
shared_network:
|
||||
name: shared_network
|
||||
driver: bridge
|
||||
driver: bridge
|
||||
external: true
|
||||
Reference in New Issue
Block a user