diff --git a/Dockerfile b/Dockerfile index d4f9a3d..cacf525 100644 --- a/Dockerfile +++ b/Dockerfile @@ -32,7 +32,7 @@ RUN crontab /etc/cron.d/feed-fetch-cron RUN touch /var/log/cron.log ADD . . -RUN bin/rails assets:precompile +RUN SECRET_KEY_BASE_DUMMY=1 bin/rails assets:precompile EXPOSE 3000 diff --git a/README.md b/README.md index 0baaf45..62dc626 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,12 @@ The following are some motivating philosophies: # Deployment +## Zenith + +[![Deploy with Zenith](https://cdn.zenith.hosting/buttons/deploy-with-zenith.svg)](https://zenith.hosting/host/haven) + +You can host Haven on Zenith without setting up or managing your own server. + ## PikaPods [![Run on PikaPods](https://www.pikapods.com/static/run-button.svg)](https://www.pikapods.com/pods?run=haven) diff --git a/zenith-compose.yml b/zenith-compose.yml new file mode 100644 index 0000000..e5f3fc0 --- /dev/null +++ b/zenith-compose.yml @@ -0,0 +1,75 @@ +services: + haven: + build: . + environment: + RAILS_ENV: production + HAVEN_DEPLOY: local + HAVEN_DB_HOST: postgresql + HAVEN_DB_NAME: haven + HAVEN_DB_ROLE: haven + volumes: + - haven_storage:/app/storage + depends_on: + postgresql: + condition: service_healthy + postgresql: + image: postgres:16-alpine + environment: + POSTGRES_DB: haven + POSTGRES_USER: haven + volumes: + - postgresqldata:/var/lib/postgresql/data + healthcheck: + test: [CMD-SHELL, "pg_isready -U haven -d haven"] + interval: 5s + timeout: 5s + retries: 12 + +volumes: + haven_storage: + postgresqldata: + +x-zenith: + catalog: + name: Haven + description: A private blog for sharing with friends and family, with a built-in RSS reader. + authors: [havenweb] + tags: [blogging, rss] + source: https://github.com/havenweb/haven + website: https://havenweb.org + license: MIT + expose: + - service: haven + port: 3000 + web: true + storage: + uploads: + volume: haven_storage + label: Private uploads + public: false + database: + volume: postgresqldata + label: PostgreSQL data + public: false + env: + SECRET_KEY_BASE: + generate: '[a-f0-9]{128}' + services: [haven] + HAVEN_DB_PASSWORD: + generate: '[A-Za-z0-9]{32}' + services: [haven] + POSTGRES_PASSWORD: + alias: HAVEN_DB_PASSWORD + services: [postgresql] + HAVEN_USER_EMAIL: + services: [haven] + input: + label: Initial admin email + default_template: '{ZENITH_OWNER_EMAIL}' + required: true + HAVEN_USER_PASS: + generate: '[A-Za-z0-9]{32}' + services: [haven] + input: + label: Initial admin password + secret: true