commit 8a27ca1064baec7c137c66de89139bc64c76e0a0 Author: 3wc <3wc.git@doesthisthing.work> Date: Sat Apr 10 14:54:54 2021 +0200 Initial commit diff --git a/.env.sample b/.env.sample new file mode 100644 index 0000000..3c63f17 --- /dev/null +++ b/.env.sample @@ -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 diff --git a/README.md b/README.md new file mode 100644 index 0000000..a673da8 --- /dev/null +++ b/README.md @@ -0,0 +1,28 @@ +# ${REPO_NAME_TITLE} + +${REPO_DESCRIPTION} + + +* **Category**: +* **Status**: +* **Image**: [`${REPO_NAME}`](https://hub.docker.com/r/${REPO_NAME}/${REPO_NAME}) +* **Healthcheck**: +* **Backups**: +* **Email**: +* **Tests**: +* **SSO**: + + +## 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 diff --git a/compose.yml b/compose.yml new file mode 100644 index 0000000..45057cd --- /dev/null +++ b/compose.yml @@ -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: