PostOwl is an open-source web application that let's you create your own website for:
All your writing in one place!
A key feature of PostOwl is 'in-place' editing that makes it super easy and fast to update your site.
Learn more about PostOwl on the website: https://www.postowl.com
PostOwl is open-source software so you can deploy it to any web host you wish.
We'll be releasing a hosted version soon. Join the email newsletter to hear when it's ready.
Hear about new releases and what's going on in the PostOwl community by joining the email newsletter.
PostOwl is a SvelteKit application inspired by editable.website using SQLite for the database. It's currently optimised for SvelteKit's adapter-node to enable deployment to Fly.io.
git clone https://github.com/PostOwl/postowl.git
cd postowl
npm install
.env.example
to .env
and edit for your environmentsqlite3 data/db.sqlite3 < scripts/schema.sql
npm run dev -- --open
.env
PostOwl uses SQLite. Beekeeper studio is an excellent app for exploring the database during development.
PostOwl sends emails when you share a letter with friends.
In development we recommend using mailpit to test email without sending real emails.
mailpit
).env
with the examples shown for mailpit in .env.example
npm run dev
- the app is now running in dev
mode and emails can be sent without encryptionTo create a production version of your app:
npm run build
You can preview the production build with npm run preview
.
We can't promise we won't add tests in the future š
More seriously: PostOwl is currently an early technical preview, so we've been moving fast and breaking things.
We like JavaScript. That doesn't mean that PostOwl might not be converted to TypeScript sometime in the future.
New contributors welcome! Join the Discussions or submit a PR. (We have opinions about what should be included in PostOwl, so it's best to discuss with first to see if a new feature will be accepted.)
Clever Cloud is a European cloud provider that handles all the infrastructure so developers can focus on their code. Deployments are immutable, meaning your app will restart when scaling, crashing or updating. PostOwl uses SQLite, so this tutorial explains how to deploy PostOwl with a replicated and always updated database. At the end, you'll get:
For this, we are going to use Litestream and Clever Cloud deployment hooks and its S3-like object storage service, Cellar.
You'll need an object storage bucket (also called S3 storage) where you'll store your database snapshots. From the Clever Cloud Console, create an Cellar add-on:
On Cellar dashboard, check Informations with the environment variables you'll need in your project:
CELLAR_ADDON_HOST
CELLAR_ADDON_KEY_ID
CELLAR_ADDON_KEY_SECRET
Copy those values and save it somewhere safe.
Fill litestream.yml
with these environment variables values:
Now you can run the command to replicate your SQLite database : ./litestream replicate -config litestream.yml
.
š”I usually advise that you create a specific folder in your bucket to host the database snapshots, you can use s3cmd CLI or a S3 client like Cyberduck to do so. If you create a folder in your bucket, make sure to change the path
value in your litestream.yml
.
Finally, add litestream.yml
to your gitignore, and ā ļø never commit it anywhere!
There is a litestream.sh
file at the root of this repository that will:
Time to deploy!
Follow these steps to deploy your PostOwl app.
BUCKET_DIRECTORY= "."
CC_PRE_RUN_HOOK="./litestream.sh"
CC_WORKER_COMMAND="./litestream replicate -config litestream.yml"
CC_WORKER_RESTART="always"
CC_WORKER_RESTART_DELAY="60"
CELLAR_REGION="fr-par"
DATA_DIR="data"
DB_PATH="data/db.sqlite3"
LITESTREAM_BACKUPS="."
LITESTREAM_BUCKET="<name-of-your-bucket>"
LITESTREAM_VERSION="0.3.9"
ā ļø If you've created a folder in your Cellar bucket, make sure to change the values of BUCKET_DIRECTORY
and LITESTREAM_BACKUPS
.
Add variables from your project's .env
file as well. Variables will be dynamically injected on deployment.
Before pushing your code, we'll connect your Cellar add-on to your app so its environment variables will be injected as well.
Now your deployment has started, which you can follow from the Logs panel.