Baby Buddy Sandstorm App
This is the source for the Baby Buddy
app for Sandstorm.
Baby Buddy currently only supports setting the application time zone from (Resolved as of v2)
an environment variable. This cannot be achieved with the regular Sandstorm
grain workflow, so the timezone is locked to Etc/UTC.
Sandstorm user ID’s are used for the username in Baby Buddy. This name is (Resolved as
used for display throughout the app and is not terribly useful.
of v2)
Baby Buddy’s API has not been fully implemented with Sandbox’s API
integration.
Primary development for the Baby Buddy application occurs at Baby Buddy
on GitHub. This repository is specifically for the Sandstorm app build process.
The primary files for the Sandstorm app configuration are:
setup.sh
: Installs nginx, uwsgi, pipenv, sqlite3 and
git.
build.sh
: Gets Baby Buddy application code from
GitHub, creates an .env
file for the application with settings location and aSECRET_KEY
, checks out the version specified in sandstorm-pkgdef.capnp
and establishes the virtual environment.
launcher.sh
: Prepares system directories, runs
application migrations, and starts uwsgi and nginx.
Follow the steps below to update the version of Baby Buddy shipped with the
Sandstorm app:
Clone this repository.
git clone git@github.com:babybuddy/babybuddy-sandstorm.git
Move in to the repository.
cd babybuddy-sandstorm
Open the sandstorm-pkgdef.capnp
file
and set the “appMarketingVersion” directive to a new version of Baby Buddy and
increment the “appVersion” directive by one.
editor .sandstorm/sandstorm-pkgdef.capnp
Start the VM via Vagrant SPK.
vagrant-spk vm up
Run the Vagrant SPK dev instance.
vagrant-spk dev
Note: Confirm that sandstorm.patch
still applies
during this command execution and update the patch if necessary.
Test new/modified functionality in the Sandstorm dev environment.
browse http://local.sandstorm.io:6080
When ready, stop the development app (Ctrl-C) and clean the files list.
./clean-sandstorm-files.sh
Pack the new SPK!
vagrant-spk pack ~/babybuddy.spk
sandstorm.patch
If Sandstorm specific changes need to updated or the patch no longer applies, a
new patch will need to created:
Follow the steps in the Development documentation above up to thevagrant-spk dev
command.
Stop the development app (Ctrl-C).
Move in to the babybuddy
folder.
cd babybuddy
Apply the patch using 3way merge so conflicts will be created.
git apply --3way ../sandstorm.patch
Resolve any conflicts and make additional changes as needed.
Add all files to git.
git add --all
Create a diff of the changes and save it to sandstorm.patch
.
git diff HEAD > ../sandstorm.patch
Return to the main repository folder and start the vagrant dev instance.
cd ..
vagrant-spk dev
If the patch update was successful, the new patch should apply cleanly during
the build phase.