A web app to help with running a Vipassana center.
Strapi for backend. Svelte with SvelteKit for frontend. Database is PostgreSQL. nginx proxy. Setup with docker compose.
Copy .env.example
to .env
and set VIRTUAL_HOST to your domain name. ADMIN_EMAIL is used for LetsEncrypt.
Started with:
docker-compose -f docker-compose.dev.yaml up --build
Notice: Backend can take a long to build the first time.
docker-compose up --build
TODO: Look att running API in a path (host/api) which would require one less DNS record and SSL certificate.
Open Strapi administration panel:
http://localhost:1337/admin
Create a administrator user.
Under Collection Types, open Users.
Add a new user. Make sure to set Confirmed to ON and Role to Authenticated.
Add other data as needed.
Select the following to configure endpoint access.
Navigate to Settings > USERS & PERMISSIONS PLUGIN > Roles > Authenticated:
APPLICATION > Bed
find, findone
APPLICATION > House
find, findone
APPLICATION > Person
find, findone
APPLICATION > Room
find, findone
APPLICATION > Stay
checking, checkout, find, findone
USER-PERMISSIONS > USER
me
Navigate to Settings > USERS & PERMISSIONS PLUGIN > Roles > Public:
USER-PERMISSIONS > AUTH
callback, connect
To make it easier to distribute project and deployment, check out this plugin:
https://github.com/boazpoolman/strapi-plugin-config-sync
TODO: Prepopulate data on first run, like houses, rooms, people and so on.
Frontend is available at [VIRTUAL_HOST].
Backend is available at api.[VIRTUAL_HOST].
Login with the user you created from Strapi administration panel.
Traefik is requesting and renewing LetsEncrypt certificate. Trafic is passed on to nginx-proxy.
https://doc.traefik.io/traefik/user-guides/docker-compose/acme-http/
For settings for exposing API in a subfolder instead of sub domain, see Strapis nginx-proxy documentation:
Environment variables in nginx configuration:
Getting SvelteKit hot reload to work when running in docker container: