Talking about this here: https://github.com/n8n-io/n8n/tree/master/docker/compose/withPostgres
I created and edited .env, downloaded init-data.sh and slightly edited docker-compose.yml
Getting this error:
n8n-db | CREATE DATABASE
n8n-db | /usr/local/bin/docker-entrypoint.sh: line 173: /docker-entrypoint-initdb.d/init-data.sh: Permission denied
the full logis:
n8n-db | The files belonging to this database system will be owned by user "postgres".
n8n-db | This user must also own the server process.
n8n-db |
n8n-db |
n8n-db | The database cluster will be initialized with locale "en_US.utf8".
n8n-db | The default database encoding has accordingly been set to "UTF8".
n8n-db | The default text search configuration will be set to "english".
n8n-db |
n8n-db |
n8n-db | Data page checksums are disabled.
n8n-db |
n8n-db |
n8n-db | fixing permissions on existing directory /var/lib/postgresql/data ... ok
n8n-db | creating subdirectories ... ok
n8n-db | selecting dynamic shared memory implementation ... posix
n8n-db | selecting default max_connections ... 100
n8n-db | selecting default shared_buffers ... 128MB
n8n-db | selecting default time zone ... Europe/Berlin
n8n-db | creating configuration files ... ok
n8n-db | running bootstrap script ... ok
n8n-db | sh: locale: not found
n8n-db | 2023-07-31 15:53:07.767 CEST [30] WARNING: no usable system locales were found
n8n-db | performing post-bootstrap initialization ... ok
n8n-db | syncing data to disk ... ok
n8n-db |
n8n-db |
n8n-db | initdb: warning: enabling "trust" authentication for local connections
n8n-db | You can change this by editing pg_hba.conf or using the option -A, or
n8n-db | --auth-local and --auth-host, the next time you run initdb.
n8n-db |
n8n-db |
n8n-db | Success. You can now start the database server using:
n8n-db |
n8n-db |
n8n-db | pg_ctl -D /var/lib/postgresql/data -l logfile start
n8n-db |
n8n-db |
n8n-db | waiting for server to start....2023-07-31 15:53:13.589 CEST [37] LOG: starting PostgreSQL 14.8 on x86_64-pc-linux-musl, compiled by gcc (Alpine 12.2.1_git20220924-r10) 12.2.1 20220924, 64-bit
n8n-db | 2023-07-31 15:53:13.594 CEST [37] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
n8n-db | 2023-07-31 15:53:13.644 CEST [38] LOG: database system was shut down at 2023-07-31 15:53:08 CEST
n8n-db | 2023-07-31 15:53:13.662 CEST [37] LOG: database system is ready to accept connections
n8n-db | done
n8n-db | server started
n8n-db | 2023-07-31 15:53:17.329 CEST [56] FATAL: database "n8n" does not exist
n8n-db | CREATE DATABASE
n8n-db | /usr/local/bin/docker-entrypoint.sh: line 173: /docker-entrypoint-initdb.d/init-data.sh: Permission denied
n8n-db |
n8n-db |
n8n-db |
n8n-db |
n8n-db | /usr/local/bin/docker-entrypoint.sh: sourcing /docker-entrypoint-initdb.d/init-data.sh
Is this about file permissions or about DB permissions?