This commit is contained in:
Philipp Rothmann 2022-07-06 16:52:30 +02:00
commit cbff6a1653
4 changed files with 115 additions and 0 deletions

10
.env.sample Normal file
View File

@ -0,0 +1,10 @@
TYPE=etherpad
DOMAIN=etherpad.example.com
## Domain aliases
#EXTRA_DOMAINS=', `www.etherpad.example.com`'
LETS_ENCRYPT_ENV=production
SECRET_DB_PASSWORD_VERSION=v1

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.envrc

25
README.md Normal file
View File

@ -0,0 +1,25 @@
# etherpad
this is experimental! :)
see full docker instructions: https://github.com/ether/etherpad-lite/blob/develop/doc/docker.md
<!-- metadata -->
* **Category**: Apps
* **Status**: 0
* **Image**: [`etherpad`](https://hub.docker.com/r/etherpad), 4, upstream
* **Healthcheck**: No
* **Backups**: No
* **Email**: No
* **Tests**: No
* **SSO**: No
<!-- endmetadata -->
## Quick start
* `abra app new etherpad --secrets`
* `abra app config <app-name>`
* `abra app deploy <app-name>`
For more, see [`docs.coopcloud.tech`](https://docs.coopcloud.tech).

79
compose.yml Normal file
View File

@ -0,0 +1,79 @@
---
version: "3.8"
services:
app:
image: etherpad/etherpad:1.8.0
networks:
- proxy
- internal
environment:
- TITLE
- FAVICON
- DEFAULT_PAD_TEXT
- ADMIN_PASSWORD=admin
- LOGLEVEL=DEBUG
- DB_TYPE=postgres
- DB_HOST=db
- DB_PORT=5432
- DB_NAME=etherpad
- DB_USER=etherpad
- DB_PASS=secret
deploy:
restart_policy:
condition: on-failure
labels:
- "traefik.enable=true"
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=9001"
- "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}"
- "coop-cloud.${STACK_NAME}.version="
# healthcheck:
# test: ["CMD", "curl", "-f", "http://localhost:9001"]
# interval: 30s
# timeout: 10s
# retries: 10
# start_period: 1m
#
db:
image: postgres:13-alpine
secrets:
- db_password
environment:
- LC_COLLATE=C
- LC_CTYPE=C
- POSTGRES_DB=etherpad
- POSTGRES_INITDB_ARGS="-E \"UTF8\""
- POSTGRES_PASSWORD=secret # _FILE=/run/secrets/db_password
- POSTGRES_USER=etherpad
networks:
- internal
healthcheck:
test: ["CMD", "pg_isready", "-U", "etherpad"]
volumes:
- postgres:/var/lib/postgresql/data
deploy:
labels:
backupbot.backup: "true"
backupbot.backup.pre-hook: "mkdir -p /tmp/backup/ && PGPASSWORD=$$(cat $${POSTGRES_PASSWORD_FILE}) pg_dump -U $${POSTGRES_USER} $${POSTGRES_DB} > /tmp/backup/backup.sql"
backupbot.backup.post-hook: "rm -rf /tmp/backup"
backupbot.backup.path: "/tmp/backup/"
secrets:
db_password:
external: true
name: ${STACK_NAME}_db_password_${SECRET_DB_PASSWORD_VERSION}
volumes:
postgres:
networks:
proxy:
external: true
internal: