Refactored penpot to use its own database
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
x-flags: &penpot-flags
|
x-flags: &penpot-flags
|
||||||
# Merged disable-sandbox into the flags array to protect the headless engine
|
# Merged disable-sandbox into the flags array to protect the headless engine
|
||||||
PENPOT_FLAGS: disable-email-verification enable-smtp enable-prepl-server disable-secure-session-cookies enable-mcp disable-sandbox
|
PENPOT_FLAGS: disable-email-verification enable-smtp enable-prepl-server disable-secure-session-cookies enable-mcp disable-sandbox enable-login-with-password
|
||||||
|
|
||||||
x-uri: &penpot-public-uri
|
x-uri: &penpot-public-uri
|
||||||
PENPOT_PUBLIC_URI: ${PENPOT_PUBLIC_URI}
|
PENPOT_PUBLIC_URI: ${PENPOT_PUBLIC_URI}
|
||||||
@@ -18,6 +18,7 @@ networks:
|
|||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
penpot_assets:
|
penpot_assets:
|
||||||
|
penpot_postgres_v15: # Added to persist your local database tables across container restarts
|
||||||
|
|
||||||
services:
|
services:
|
||||||
penpot-frontend:
|
penpot-frontend:
|
||||||
@@ -45,16 +46,19 @@ services:
|
|||||||
- penpot-net
|
- penpot-net
|
||||||
ports:
|
ports:
|
||||||
- "6060:6060"
|
- "6060:6060"
|
||||||
|
depends_on:
|
||||||
|
penpot-postgres:
|
||||||
|
condition: service_healthy # Binds initialization order to a healthy local database
|
||||||
environment:
|
environment:
|
||||||
<< : [*penpot-flags, *penpot-public-uri, *penpot-http-body-size, *penpot-secret-key]
|
<< : [*penpot-flags, *penpot-public-uri, *penpot-http-body-size, *penpot-secret-key]
|
||||||
|
|
||||||
# Security Handshake Key for internal Exporter validation routines
|
# Security Handshake Key for internal Exporter validation routines
|
||||||
PENPOT_EXPORTER_SECRET_KEY: ${PENPOT_EXPORTER_SECRET_KEY}
|
PENPOT_EXPORTER_SECRET_KEY: ${PENPOT_EXPORTER_SECRET_KEY}
|
||||||
|
|
||||||
## Database connection parameters pointing directly to your external LXC
|
## Local Internal Database connection parameters
|
||||||
# Note: Ensure the raw string value assigned to this variable inside your .env
|
PENPOT_DATABASE_URI: postgresql://penpot-postgres/penpot
|
||||||
# has special characters URL-encoded (e.g. postgresql://penpot:ddlO%26%40jdw72%23zA@...)
|
PENPOT_DATABASE_USERNAME: penpot
|
||||||
PENPOT_DATABASE_URI: ${PENPOT_DATABASE_URI}
|
PENPOT_DATABASE_PASSWORD: penpot
|
||||||
|
|
||||||
## Valkey/Redis parameters routed directly to your active k3s node
|
## Valkey/Redis parameters routed directly to your active k3s node
|
||||||
PENPOT_REDIS_URI: ${PENPOT_REDIS_URI}
|
PENPOT_REDIS_URI: ${PENPOT_REDIS_URI}
|
||||||
@@ -65,7 +69,6 @@ services:
|
|||||||
|
|
||||||
## Telemetry & Optional settings
|
## Telemetry & Optional settings
|
||||||
PENPOT_TELEMETRY_ENABLED: "false"
|
PENPOT_TELEMETRY_ENABLED: "false"
|
||||||
PENPOT_FLAGS: enable-login-with-password
|
|
||||||
|
|
||||||
penpot-mcp:
|
penpot-mcp:
|
||||||
image: "penpotapp/mcp:${PENPOT_VERSION:-latest}"
|
image: "penpotapp/mcp:${PENPOT_VERSION:-latest}"
|
||||||
@@ -88,3 +91,24 @@ services:
|
|||||||
PENPOT_REDIS_URI: ${PENPOT_REDIS_URI}
|
PENPOT_REDIS_URI: ${PENPOT_REDIS_URI}
|
||||||
PENPOT_REDIS_URL: ${PENPOT_REDIS_URI}
|
PENPOT_REDIS_URL: ${PENPOT_REDIS_URI}
|
||||||
PENPOT_FLAGS: disable-sandbox
|
PENPOT_FLAGS: disable-sandbox
|
||||||
|
|
||||||
|
# Integrated isolated Database Service
|
||||||
|
penpot-postgres:
|
||||||
|
image: "postgres:15"
|
||||||
|
restart: always
|
||||||
|
stop_signal: SIGINT
|
||||||
|
networks:
|
||||||
|
- penpot-net
|
||||||
|
volumes:
|
||||||
|
- penpot_postgres_v15:/var/lib/postgresql/data
|
||||||
|
environment:
|
||||||
|
- POSTGRES_INITDB_ARGS=--data-checksums
|
||||||
|
- POSTGRES_DB=penpot
|
||||||
|
- POSTGRES_USER=penpot
|
||||||
|
- POSTGRES_PASSWORD=penpot
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD-SHELL", "pg_isready -U penpot"]
|
||||||
|
interval: 2s
|
||||||
|
timeout: 10s
|
||||||
|
retries: 5
|
||||||
|
start_period: 2s
|
||||||
Reference in New Issue
Block a user