Skip to content

Instantly share code, notes, and snippets.

@paulknulst
Last active October 6, 2022 15:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paulknulst/18829ae330bf6fcd3917aee7ff4a3b7d to your computer and use it in GitHub Desktop.
Save paulknulst/18829ae330bf6fcd3917aee7ff4a3b7d to your computer and use it in GitHub Desktop.
Deploy Free Figma Alternative Penpot With Docker (Remote files)
# Standard database connection parameters (only postgresql is supported):
PENPOT_DATABASE_URI=postgresql://penpot-postgres/penpot
PENPOT_DATABASE_USERNAME=penpot
PENPOT_DATABASE_PASSWORD=penpot
# Redis is used for the websockets notifications.
PENPOT_REDIS_URI=redis://penpot-redis/0
ASSETS_STORAGE_BACKEND=assets-fs
PENPOT_STORAGE_ASSETS_FS_DIRECTORY=/opt/data/assets
PENPOT_TELEMETRY_ENABLED=false
# Enable or disable external user registration process.
PENPOT_REGISTRATION_ENABLED=true
PENPOT_REGISTRATION_DOMAIN_WHITELIST=""
#Your public penpot url
PENPOT_PUBLIC_URI=
# Enable Email
PENPOT_SMTP_ENABLED=true
PENPOT_SMTP_DEFAULT_FROM=
PENPOT_SMTP_DEFAULT_REPLY_TO=
PENPOT_SMTP_HOST=
PENPOT_SMTP_PORT=
PENPOT_SMTP_USERNAME=
PENPOT_SMTP_PASSWORD=
PENPOT_SMTP_TLS=
PENPOT_SMTP_SSL=
# Standard database connection parameters (only postgresql is supported):
PENPOT_DATABASE_URI=postgresql://penpot-postgres/penpot
PENPOT_DATABASE_USERNAME=penpot
PENPOT_DATABASE_PASSWORD=penpot
# Redis is used for the websockets notifications.
PENPOT_REDIS_URI=redis://penpot-redis/0
ASSETS_STORAGE_BACKEND=assets-fs
PENPOT_STORAGE_ASSETS_FS_DIRECTORY=/opt/data/assets
PENPOT_TELEMETRY_ENABLED=false
# Enable or disable external user registration process.
PENPOT_REGISTRATION_ENABLED=false
PENPOT_REGISTRATION_DOMAIN_WHITELIST=""
#Your public penpot url
PENPOT_PUBLIC_URI=
# Enable Email
PENPOT_SMTP_ENABLED=true
PENPOT_SMTP_DEFAULT_FROM=
PENPOT_SMTP_DEFAULT_REPLY_TO=
PENPOT_SMTP_HOST=
PENPOT_SMTP_PORT=
PENPOT_SMTP_USERNAME=
PENPOT_SMTP_PASSWORD=
PENPOT_SMTP_TLS=
PENPOT_SMTP_SSL=
[2022-10-06 10:18:13.523] I app.config - hint="flags initialized", flags="backend-api-doc,secure-session-cookies,login,backend-worker,registration"
[2022-10-06 10:18:14.295] I app.metrics - action="initialize metrics"
Email: [2022-10-06 10:18:14.334] I app.db - hint="initialize connection pool", name="main", uri="postgresql://penpot-postgres/penpot", read-only=false, with-credentials=true, min-size=0, max-size
=30
[2022-10-06 10:22:33.900] I app.config - hint="flags initialized", flags="backend-api-doc,secure-session-cookies,login,backend-worker,registration"
[2022-10-06 10:22:34.636] I app.metrics - action="initialize metrics"
Email: [2022-10-06 10:22:34.675] I app.db - hint="initialize connection pool", name="main", uri="postgresql://penpot-postgres/penpot", read-only=false, with-credentials=true, min-size=0, max-size
=30
user@local.de
Full Name: Paul Knulst
Password:
User created successfully.
docker exec -it penpot-penpot-backend-1 ./manage.sh create-profile
version: "3.5"
networks:
default:
external: false
traefik-public:
external: true
volumes:
postgres_data:
assets_data:
services:
frontend:
image: "penpotapp/frontend:latest"
hostname: frontend.penpot
volumes:
- assets_data:/opt/data
env_file:
- config.env
depends_on:
- penpot-backend
- penpot-exporter
networks:
- default
- traefik-public
labels:
- traefik.enable=true
- traefik.docker.network=traefik-public
- traefik.constraint-label=traefik-public
- traefik.http.routers.penpot-http.rule=Host(`${PENPOT_URL}`)
- traefik.http.routers.penpot-http.entrypoints=http
- traefik.http.routers.penpot-http.middlewares=https-redirect
- traefik.http.routers.penpot-https.rule=Host(`${PENPOT_URL}`)
- traefik.http.routers.penpot-https.entrypoints=https
- traefik.http.routers.penpot-https.tls=true
- traefik.http.routers.penpot-https.tls.certresolver=le
- traefik.http.services.penpot.loadbalancer.server.port=80
backend:
image: "penpotapp/backend:latest"
hostname: backend.penpot
volumes:
- assets_data:/opt/data
depends_on:
- postgres
- redis
env_file:
- config.env
networks:
- default
exporter:
image: "penpotapp/exporter:latest"
environment:
# Don't touch it; this uses internal docker network to
# communicate with the frontend.
- PENPOT_PUBLIC_URI=http://frontend.penpot
networks:
- default
postgres:
image: "postgres:13"
restart: always
stop_signal: SIGINT
environment:
- POSTGRES_INITDB_ARGS=--data-checksums
- POSTGRES_DB=penpot
- POSTGRES_USER=penpot
- POSTGRES_PASSWORD=penpot
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- default
redis:
image: redis:6
restart: always
networks:
- default
wget https://raw.githubusercontent.com/penpot/penpot/main/docker/images/docker-compose.yaml
wget https://raw.githubusercontent.com/penpot/penpot/main/docker/images/config.env
export PENPOT_URL=your-website.com
docker-compose -p penpot up -d
@paulknulst
Copy link
Author

Gist for my article about deploying Penpot with Docker and Traefik: https://www.knulst.de/deploy-free-figma-alternative-penpot-with-docker/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment