diff --git a/.env.sample b/.env.sample index 1bfce1f..4a22925 100644 --- a/.env.sample +++ b/.env.sample @@ -1,8 +1,31 @@ +# recipe vars TYPE=lauti - -DOMAIN=lauti.example.com - -## Domain aliases -#EXTRA_DOMAINS=', `www.lauti.example.com`' - +COMPOSE_FILE="compose.yml:compose.smtp.yml:compose.plausible.yml" LETS_ENCRYPT_ENV=production + +# secret versions +SECRET_ADMIN_PASSWORD_VERSION=v1 +SECRET_SMTP_PASSWORD_VERSION=v1 + +# customize +## General +DOMAIN=lauti.example.com +#EXTRA_DOMAINS=', `www.lauti.example.com`' #additional domains (URL stays when opened) +#REDIRECTS=www.example.com|foo.example.com #redirect domains (URL gets changed to DOMAIN when opened) +LAUTI_ADMIN_EMAIL=admin@example.com +LAUTI_TIMEZONE=Europe/Berlin +LAUTI_THEME=lauti + +## Plausible +LAUTI_PLAUSIBLE_HOST=https://plausible.example.com + +## Mail +LAUTI_MAIL_SMTP_HOST=host.example.com:465 +LAUTI_MAIL_SMTP_USER=username +LAUTI_MAIL_ADDRESS=mail@example.com +LAUTI_MAIL_ALLOW_LIST=mail@example.com,mail2@example.com +LAUTI_MAIL_SMTP_SECURE=SSL + +## Debugging +LAUTI_DEBUG=false +LAUTI_LOG_LEVEL=info \ No newline at end of file diff --git a/README.md b/README.md index e3b21fa..8c37c3e 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,15 @@ -# lauti +# LAUTI -> One line description of the recipe +> [LAUTI](https://codeberg.org/Klasse-Methode/lauti) is a calendar software where one can publish events, groups and places. It is intended for use in cities or areas. It features a public event list, a group list, a place list, all available as RSS and ICAL feeds. Adding events, groups an places is only granted to registered organizations or individuals. Invitation links can be easily generated. Admins can create own highly customizable frontends/themes based on go templates, markdown files, css and javascript in the admin area. The admin area features a basic messaging system, user management, tags and management of event categories and topics. LAUTI also provides a public Rest API and runs as progressive web app. * **Category**: Apps -* **Status**: 0 -* **Image**: [`lauti`](https://hub.docker.com/r/lauti), 4, upstream +* **Status**: 3 +* **Image**: [`lauti`](https://codeberg.org/Klasse-Methode/-/packages/container/lauti), 4, upstream * **Healthcheck**: No -* **Backups**: No -* **Email**: No +* **Backups**: Yes +* **Email**: Yes * **Tests**: No * **SSO**: No diff --git a/compose.plausible.yml b/compose.plausible.yml new file mode 100644 index 0000000..a7848b7 --- /dev/null +++ b/compose.plausible.yml @@ -0,0 +1,9 @@ +--- +version: "3.8" + +services: + app: + environment: + - LAUTI_PLAUSIBLE_HOST + - LAUTI_PLAUSIBLE_DOMAIN=${DOMAIN} + \ No newline at end of file diff --git a/compose.smtp.yml b/compose.smtp.yml new file mode 100644 index 0000000..0110ee9 --- /dev/null +++ b/compose.smtp.yml @@ -0,0 +1,19 @@ +--- +version: "3.8" + +services: + app: + environment: + - LAUTI_MAIL_SMTP_HOST + - LAUTI_MAIL_SMTP_USER + - LAUTI_MAIL_SMTP_PASSWORD_FILE=/run/secrets/smtp_password + - LAUTI_MAIL_ADDRESS + - LAUTI_MAIL_ALLOW_LIST + - LAUTI_MAIL_SMTP_SECURE + secrets: + - smtp_password + +secrets: + smtp_password: + name: ${STACK_NAME}_smtp_password_${SECRET_SMTP_PASSWORD_VERSION} + external: true diff --git a/compose.yml b/compose.yml index a2c3805..3d1bf1b 100644 --- a/compose.yml +++ b/compose.yml @@ -3,30 +3,60 @@ version: "3.8" services: app: - image: nginx:1.20.0 + image: codeberg.org/klasse-methode/lauti:${IMAGE_TAG:-1.0.0} networks: - proxy + environment: + - LAUTI_SQLITE_DB=/data/lauti.db + - LAUTI_ADDR=0.0.0.0:3333 + - LAUTI_HTTP_READ_TIMEOUT=5s + - LAUTI_HTTP_WRITE_TIMEOUT=50s + - LAUTI_HTTP_HANDLER_TIMEOUT=5s + - LAUTI_SEARCH_INDEX_PATH=/data/lauti.bleve + - LAUTI_SEARCH_TIMEOUT=5s + - LAUTI_SEARCH_RESULT_CACHE_SIZE=100 + - LAUTI_SEARCH_BUCKET_CACHE_SIZE=100 + - LAUTI_ADMIN_EMAIL + - LAUTI_MEDIA_PATH=/data/media + - LAUTI_ADMIN_PASSWORD_FILE=/run/secrets/admin_password + - LAUTI_BASE_URL=https://${DOMAIN} + - LAUTI_KILLSWITCH_HASHES + - LAUTI_TIMEZONE + - LAUTI_THEME + - LAUTI_THEMES_PATH=/data/themes + - LAUTI_OSM_TILE_CACHE_DIR=/data/cache/osm + - LAUTI_OSM_TILE_SERVER=https://tile.openstreetmap.org/{z}/{x}/{y}.png + - LAUTI_DEBUG + - LAUTI_AUTH_KEY_PATH=/data/auth-key + secrets: + - admin_password deploy: - restart_policy: - condition: on-failure + update_config: + failure_action: rollback + order: start-first 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.services.${STACK_NAME}.loadbalancer.server.port=3333" - "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"] - interval: 30s - timeout: 10s - retries: 10 - start_period: 1m + - "traefik.http.middlewares.${STACK_NAME}-redirect.redirectregex.regex=^https://(${REDIRECTS})/(.*)" + - "traefik.http.middlewares.${STACK_NAME}-redirect.redirectregex.replacement=https://${DOMAIN}/$${2}" + - "traefik.http.middlewares.${STACK_NAME}-redirect.redirectregex.permanent=true" + - "traefik.http.routers.${STACK_NAME}.middlewares=${STACK_NAME}-redirect" + - "backupbot.backup=true" + - "coop-cloud.${STACK_NAME}.version=1.0.0+1.0.0" + volumes: + - "data:/data" + +secrets: + admin_password: + name: ${STACK_NAME}_admin_password_${SECRET_ADMIN_PASSWORD_VERSION} + external: true networks: proxy: external: true + +volumes: + data: \ No newline at end of file