This is the source for the Baby Buddy app for Sandstorm.
- v5: Baby Buddy 1.11.0
- v4: Baby Buddy 1.9.1
- v3: Baby Buddy 1.5.0
- v2: Baby Buddy 1.4.0
- v1: Baby Buddy 1.3.4
- v0: Baby Buddy 1.3.0
-
Baby Buddy currently only supports setting the application time zone from an environment variable. This cannot be achieved with the regular Sandstorm grain workflow, so the timezone is locked to Etc/UTC.(Resolved as of v2) -
Sandstorm user ID's are used for the username in Baby Buddy. This name is used for display throughout the app and is not terribly useful.(Resolved as 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 insandstorm-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
Updating 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 the
vagrant-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.