this post was submitted on 29 Nov 2023
1 points (66.7% liked)
Self-Hosted Main
504 readers
1 users here now
A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.
For Example
- Service: Dropbox - Alternative: Nextcloud
- Service: Google Reader - Alternative: Tiny Tiny RSS
- Service: Blogger - Alternative: WordPress
We welcome posts that include suggestions for good self-hosted alternatives to popular online services, how they are better, or how they give back control of your data. Also include hints and tips for less technical readers.
Useful Lists
- Awesome-Selfhosted List of Software
- Awesome-Sysadmin List of Software
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Please, I'm struggling with the docker-compose with postgres to get my n8n up and running... so just copy the docker-compose from the doc and made changes for my needs, could you tell me if im doin it rigth? or should I change something?
i want all data in:
/docker/n8n/
soroot@13-n8n-RL23-WG /docker/n8n# nano .env
POSTGRES_USER=user-root
POSTGRES_PASSWORD=password-root
POSTGRES_DB=n8n
POSTGRES_NON_ROOT_USER=user-nonroot
POSTGRES_NON_ROOT_PASSWORD=password-nonroot
root@13-n8n-RL23-WG /docker/n8n# nano docker-compose.yml
version: '3.8'
volumes:
db_storage:
n8n_storage:
services:
postgres:
image: postgres:11
restart: always
environment:
- POSTGRES_USER
- POSTGRES_PASSWORD
- POSTGRES_DB
- POSTGRES_NON_ROOT_USER
- POSTGRES_NON_ROOT_PASSWORD
volumes:
- /docker/n8n/postgresql/data:/var/lib/postgresql/data
- ./init-data.sh:/docker-entrypoint-initdb.d/init-data.sh
healthcheck:
test: ['CMD-SHELL', 'pg_isready -h localhost -U ${POSTGRES_USER} -d ${POSTGRES_DB}']
interval: 5s
timeout: 5s
retries: 10
n8n:
image: docker.n8n.io/n8nio/n8n
restart: always
environment:
- DB_TYPE=postgresdb
- DB_POSTGRESDB_HOST=postgres
- DB_POSTGRESDB_PORT=5432
- DB_POSTGRESDB_DATABASE=${POSTGRES_DB}
- DB_POSTGRESDB_USER=${POSTGRES_NON_ROOT_USER}
- DB_POSTGRESDB_PASSWORD=${POSTGRES_NON_ROOT_PASSWORD}
- WEBHOOK_URL=https://subdomain.wtf.org/
- EXECUTIONS_PROCESS=main
- GENERIC_TIMEZONE=America/La_Paz
- TZ=America/La_Paz
ports:
- 5678:5678
links:
- postgres
volumes:
- /docker/n8n:/home/node/.n8n
depends_on:
postgres:
condition: service_healthy
And so it begins ^^