Skip to content

Commit

Permalink
fix penpot
Browse files Browse the repository at this point in the history
  • Loading branch information
chendelin1982 authored Mar 4, 2024
1 parent ba62b7b commit 7d17ab5
Show file tree
Hide file tree
Showing 6 changed files with 138 additions and 0 deletions.
19 changes: 19 additions & 0 deletions apps/penpot/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
W9_REPO=penpotapp/frontend
W9_DIST=community
W9_VERSION=latest

W9_HTTP_PORT_SET=9001

#### -- Not allowed to edit below environments when recreate app based on existing data -- ####

W9_ID=penpot
W9_HTTP_PORT=80
W9_URL=example.youdomain.com
W9_URL_REPLACE=true
W9_NETWORK=websoft9

#### ----------------------------------------------------------------------------------------- ####

# Penpot environnemnt need add to docker-compose.yml, why?
# Penpot has several different containers with the same-named environment variable,
# but with different purposes and parameters, so this project does not add environment variables for Penpot here.
5 changes: 5 additions & 0 deletions apps/penpot/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# CHANGELOG

## Release
### Fixes and Enhancements

4 changes: 4 additions & 0 deletions apps/penpot/Notes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Penpot

- smtp not need
- what is prepl?
89 changes: 89 additions & 0 deletions apps/penpot/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# docs: https://penpot.app/self-host
# compose: https://github.com/penpot/penpot/blob/develop/docker/images/docker-compose.yaml
# environment: Below environment is created by Penpot: https://help.penpot.app/technical-guide/configuration/
# disable-secure-session-cookies is very important otherwise can not login

version: '3.8'

services:

penpot-frontend:
image: $W9_REPO:$W9_VERSION
container_name: $W9_ID
restart: unless-stopped
ports:
- $W9_HTTP_PORT_SET:80
env_file: .env
volumes:
- penpot_assets:/opt/data/assets
environment:
# flags refer to: https://help.penpot.app/technical-guide/configuration/#advanced-configuration
- PENPOT_FLAGS=enable-registration enable-login-with-password
depends_on:
- penpot-backend
- penpot-exporter

penpot-backend:
image: penpotapp/backend:$W9_VERSION
container_name: $W9_ID-backend
restart: unless-stopped
env_file: .env
volumes:
- penpot_assets:/opt/data/assets
environment:
# flags refer to: https://help.penpot.app/technical-guide/configuration/#advanced-configuration
- PENPOT_FLAGS=enable-registration enable-login-with-password disable-email-verification enable-smtp enable-prepl-server disable-secure-session-cookies
- PENPOT_PREPL_HOST=0.0.0.0
- PENPOT_PUBLIC_URI=http://$W9_URL
- PENPOT_DATABASE_URI=postgresql://$W9_ID-postgresql/penpot
- PENPOT_DATABASE_USERNAME=penpot
- PENPOT_DATABASE_PASSWORD=penpot
- PENPOT_REDIS_URI=redis://$W9_ID-redis/0
- PENPOT_ASSETS_STORAGE_BACKEND=assets-fs
- PENPOT_STORAGE_ASSETS_FS_DIRECTORY=/opt/data/assets
- PENPOT_TELEMETRY_ENABLED=true
depends_on:
- redis
- postgres

penpot-exporter:
image: "penpotapp/exporter:latest"
container_name: $W9_ID-exporter
restart: always
environment:
# Don't touch it; this uses internal docker network to
# communicate with the frontend.
- PENPOT_PUBLIC_URI=http://penpot-frontend

## Redis is used for the websockets notifications.
- PENPOT_REDIS_URI=redis://penpot-redis/0

redis:
image: redis:7
container_name: $W9_ID-redis
restart: unless-stopped
volumes:
- redis:/data

postgres:
image: "postgres:15"
container_name: $W9_ID-postgresql
restart: unless-stopped
stop_signal: SIGINT
volumes:
- postgres:/var/lib/postgresql/data
environment:
- POSTGRES_INITDB_ARGS=--data-checksums
- POSTGRES_DB=penpot
- POSTGRES_USER=penpot
- POSTGRES_PASSWORD=penpot

volumes:
postgres:
redis:
penpot_assets:

networks:
default:
name: $W9_NETWORK
external: true
3 changes: 3 additions & 0 deletions apps/penpot/src/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# About

This folder includes files mount to container and used by Websoft9
18 changes: 18 additions & 0 deletions apps/penpot/variables.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "penpot",
"trademark": "Penpot",
"release": false,
"fork_url": "https://github.com/penpot/penpot",
"edition": [
{
"dist": "community",
"version": ["1.19.3","latest"]
}
],
"requirements": {
"cpu": "1",
"memory": "1",
"disk": "1",
"url": "https://help.penpot.app/technical-guide"
}
}

0 comments on commit 7d17ab5

Please sign in to comment.