Initial commit

This commit is contained in:
3wc 2021-04-10 14:54:54 +02:00
commit 8a27ca1064
3 changed files with 154 additions and 0 deletions

35
.env.sample Normal file
View File

@ -0,0 +1,35 @@
TYPE=penpot
DOMAIN=penpot.example.com
## Domain aliases
#EXTRA_DOMAINS=', `www.${REPO_NAME_KEBAB}.example.com`'
LETS_ENCRYPT_ENV=production
# By default files upload by user are stored in local
# filesystem. But it can be configured to store in AWS S3 or
# completelly in de the database. Storing in the database makes
# the backups more easy but will make access to media less
# performant.
PENPOT_STORAGE_BACKEND=fs
# Telemetry. When enabled, a periodical process will send
# annonymous data about this instance. Telemetry data will
# enable us to learn on how the application is used based on
# real scenarios. If you want to help us, please leave it
# enabled. In any case you can see the source code of both
# client and server in the penpot repository.
PENPOT_TELEMETRY_ENABLED=false
# Email sending configuration. By default emails are printed in
# console, but for production usage is recommeded to setup a
# real SMTP provider. Emails are used for confirm user
# registration.
PENPOT_SMTP_ENABLED=false
PENPOT_SMTP_DEFAULT_FROM=penpot@example.com
PENPOT_SMTP_DEFAULT_REPLY_TO=penpot@example.com
#PENPOT_SMTP_HOST=smtp.example.com
#PENPOT_SMTP_PORT=25
#PENPOT_SMTP_USERNAME=username
#PENPOT_SMTP_PASSWORD=password
#PENPOT_SMTP_TLS=true
#PENPOT_SMTP_SSL=false

28
README.md Normal file
View File

@ -0,0 +1,28 @@
# ${REPO_NAME_TITLE}
${REPO_DESCRIPTION}
<!-- metadata -->
* **Category**:
* **Status**:
* **Image**: [`${REPO_NAME}`](https://hub.docker.com/r/${REPO_NAME}/${REPO_NAME})
* **Healthcheck**:
* **Backups**:
* **Email**:
* **Tests**:
* **SSO**:
<!-- endmetadata -->
## Basic usage
1. Set up Docker Swarm and [`abra`]
2. Deploy [`coop-cloud/traefik`]
3. `abra app new ${REPO_NAME} --secrets` (optionally with `--pass` if you'd like
to save secrets in `pass`)
4. `abra app YOURAPPDOMAIN config` - be sure to change `$DOMAIN` to something that resolves to
your Docker swarm box
5. `abra app YOURAPPDOMAIN deploy`
6. Open the configured domain in your browser to finish set-up
[`abra`]: https://git.autonomic.zone/autonomic-cooperative/abra
[`coop-cloud/traefik`]: https://git.autonomic.zone/coop-cloud/traefik

91
compose.yml Normal file
View File

@ -0,0 +1,91 @@
---
version: "3.8"
services:
app:
image: "penpotapp/frontend:1.4.0-alpha"
networks:
- proxy
- backend
volumes:
- penpot_assets:/opt/data
depends_on:
- penpot-backend
- penpot-exporter
deploy:
restart_policy:
condition: on-failure
labels:
- "traefik.enable=true"
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=80"
- "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`${EXTRA_DOMAINS})"
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
# Redirect from EXTRA_DOMAINS to DOMAIN
- "traefik.http.routers.${STACK_NAME}.middlewares=${STACK_NAME}-redirect"
- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLForceHost=true"
- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLHost=${DOMAIN}"
penpot-backend:
image: "penpotapp/backend:1.4.0-alpha"
volumes:
- penpot_assets:/opt/data
depends_on:
- postgres
- redis
environment:
- PENPOT_PUBLIC_URI=https://{domain}
- PENPOT_DATABASE_URI=postgresql://postgres/penpot
- PENPOT_DATABASE_USERNAME=penpot
- PENPOT_DATABASE_PASSWORD=penpot
- PENPOT_REDIS_URI=redis://redis/0
- PENPOT_STORAGE_BACKEND=${PENPOT_STORAGE_BACKEND}
- PENPOT_STORAGE_FS_DIRECTORY=/opt/data/assets
- PENPOT_TELEMETRY_ENABLED=${PENPOT_TELEMETRY_ENABLED}
- PENPOT_SMTP_ENABLED=${PENPOT_SMTP_ENABLED}
- PENPOT_SMTP_DEFAULT_FROM=${PENPOT_SMTP_DEFAULT_FROM}
- PENPOT_SMTP_DEFAULT_REPLY_TO=${PENPOT_SMTP_DEFAULT_REPLY_TO}
- PENPOT_SMTP_HOST=${PENPOT_SMTP_HOST}
- PENPOT_SMTP_PORT=${PENPOT_SMTP_PORT}
- PENPOT_SMTP_USERNAME=${PENPOT_SMTP_USERNAME}
- PENPOT_SMTP_PASSWORD=${PENPOT_SMTP_PASSWORD}
- PENPOT_SMTP_TLS=${PENPOT_SMTP_TLS}
- PENPOT_SMTP_SSL=${PENPOT_SMTP_SSL}
networks:
- backend
penpot-exporter:
image: "penpotapp/exporter:1.4.0-alpha"
environment:
# Don't touch it; this uses internal docker network to
# communicate with the frontend.
- PENPOT_PUBLIC_URI=http://app
networks:
- backend
postgres:
image: "postgres:13"
stop_signal: SIGINT
environment:
- POSTGRES_INITDB_ARGS=--data-checksums
- POSTGRES_DB=penpot
- POSTGRES_USER=penpot
- POSTGRES_PASSWORD=penpot
volumes:
- postgres:/var/lib/postgresql/data
networks:
- backend
redis:
image: redis:6
networks:
- backend
networks:
proxy:
external: true
backend:
volumes:
postgres:
penpot_assets: