mirror of
https://github.com/n8n-io/n8n.git
synced 2026-10-18 14:56:50 +02:00
34 lines
927 B
YAML
34 lines
927 B
YAML
volumes:
|
|
postgres-data:
|
|
|
|
services:
|
|
postgres:
|
|
image: postgres:18-alpine
|
|
restart: unless-stopped
|
|
volumes:
|
|
- postgres-data:/var/lib/postgresql
|
|
environment:
|
|
- POSTGRES_DB=n8n
|
|
- POSTGRES_PASSWORD=password
|
|
|
|
n8n:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
# Required by the docker-in-docker devcontainer feature
|
|
privileged: true
|
|
volumes:
|
|
- ../..:/workspaces:cached
|
|
command: sleep infinity
|
|
depends_on:
|
|
- postgres
|
|
environment:
|
|
DB_POSTGRESDB_HOST: postgres
|
|
DB_TYPE: postgresdb
|
|
DB_POSTGRESDB_PASSWORD: password
|
|
# Prompt-cache TTL in seconds. 1 hour keeps the cache warm between turns.
|
|
ANTHROPIC_PROMPT_CACHE_TTL: "3600"
|
|
# Compose does not inherit the codespace env. Pass the box name through so
|
|
# the worker can stamp boxId and dev:up can print the forwarded URL.
|
|
CODESPACE_NAME: ${CODESPACE_NAME:-}
|