rs22 / monica-sandstorm

Sandstorm Packaging for Monica
1 stars 2 forks source link
monicahq sandstorm-app

Monica Sandstorm Package

This repository contains files to turn the Monica Personal Relationship Manager into a Sandstorm app.

It is based off the official Docker image and installs and configures nginx and mysqld as outlined by the vagrant-spk lemp stack.

Sandstorm-specific adjustments are applied through .patch-files.

Development Guide

Prerequisites: Local Sandstorm, spk, Docker, buildah

  1. Build the Docker image, mount it and register the mounted path in sandstorm-pkgdef.capnp: sudo ./build
  2. sudo spk dev (need to be root to access the mounted image filesystem)

If you want to make changes to monica, you can clone it into the opt/www/html directory and it will override the installation provided by Docker:

  1. git submodule add https://github.com/monicahq/monica opt/www/html
  2. cd opt/www/html && git checkout $CURRENT_MONICA_VERSION
  3. rm -rf storage && ln -s /var/www/html/storage storage && ln -s /var/www/html/.env .env
  4. git apply-patch

Note that if you change parts of the client-side JavaScript, these have to be manually transferred into the public/js/vendor.js (i.e. using yarn production) in order to be picked up.

When finished, commit your changes to monica and create a new patch file:

git commit
git format-patch HEAD~1 --stdout > ../../../monica-patches/php/my-patch.patch

Overview of build files