2023-02-23 01:42:41 +01:00
|
|
|
# References
|
|
|
|
|
|
|
|
- https://github.com/n8n-io/n8n
|
2024-09-27 01:10:28 +02:00
|
|
|
- https://github.com/n8n-io/n8n-hosting/tree/main/docker-compose/withPostgres
|
2024-02-22 12:29:00 +01:00
|
|
|
|
|
|
|
# Notes
|
|
|
|
|
|
|
|
You have to pre-supply a database init script to properly setup the postgresql database beforehand.
|
|
|
|
|
|
|
|
Please follow these steps to do so:
|
|
|
|
|
|
|
|
````
|
|
|
|
# create new directory for database
|
2024-09-26 22:41:00 +02:00
|
|
|
mkdir -p /mnt/docker-volumes/n8n/storage
|
2024-02-22 12:29:00 +01:00
|
|
|
|
|
|
|
# move the init file from this repo to the new location
|
|
|
|
mv init-database.sh /mnt/docker-volumes/n8n/.
|
|
|
|
|
2024-09-26 22:44:21 +02:00
|
|
|
# fix permissions
|
|
|
|
sudo chown -R 0:1000 /mnt/docker-volumes/n8n/
|
|
|
|
sudo chmod -R 775 /mnt/docker-volumes/n8n/
|
2024-09-27 01:09:20 +02:00
|
|
|
|
|
|
|
# adjust environment variables
|
|
|
|
nano .env
|
2024-02-22 12:29:00 +01:00
|
|
|
````
|
|
|
|
|
2024-09-27 01:09:20 +02:00
|
|
|
Afterwards, you can proceed spawning up the docker compose stack:
|
2024-02-22 12:29:00 +01:00
|
|
|
|
|
|
|
````
|
2024-09-26 22:41:56 +02:00
|
|
|
docker compose up -d
|
2024-02-22 12:29:00 +01:00
|
|
|
````
|