I’m self-hosting n8n with a custom PostgreSQL setup using Docker Compose. How can I automatically set up the owner account to obtain the necessary API key for integration in both testing and production environments?
services:
db_service:
image: postgres:13-alpine
ports:
- "5433:5432"
environment:
USER: admin
PASSWORD: adminpass
volumes:
- ./data/postgres:/var/lib/postgresql/data
- ./init-scripts:/docker-entrypoint-initdb.d
workflow_app:
image: mycustom/n8n:latest
ports:
- "5679:5678"
environment:
- DATABASE_TYPE=postgresql
- DATABASE_NAME=workflowdb
- DATABASE_HOST=db_service
- DATABASE_PORT=5432
- DATABASE_USER=admin
- DATABASE_PASSWORD=adminpass
volumes:
- ./n8n_data:/home/node/.n8n