项目作者: babybuddy

项目描述 :
Baby Buddy Sandstorm App
高级语言: Ruby
项目地址: git://github.com/babybuddy/babybuddy-sandstorm.git
创建时间: 2020-02-06T23:09:16Z
项目社区:https://github.com/babybuddy/babybuddy-sandstorm

开源协议:BSD 2-Clause "Simplified" License

下载


Baby Buddy Sandstorm App

This is the source for the Baby Buddy
app for Sandstorm.

App Version History

Caveats

  • 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.

Development

Primary development for the Baby Buddy application occurs at Baby Buddy
on GitHub. This repository is specifically for the Sandstorm app build process.

Sandstorm configuration

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 a
    SECRET_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.

Updating Baby Buddy

Follow the steps below to update the version of Baby Buddy shipped with the
Sandstorm app:

  1. Clone this repository.

    1. git clone git@github.com:babybuddy/babybuddy-sandstorm.git
  2. Move in to the repository.

    1. cd babybuddy-sandstorm
  3. 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.

    1. editor .sandstorm/sandstorm-pkgdef.capnp
  4. Start the VM via Vagrant SPK.

    1. vagrant-spk vm up
  5. Run the Vagrant SPK dev instance.

    1. vagrant-spk dev

    Note: Confirm that sandstorm.patch still applies
    during this command execution and update the patch if necessary.

  6. Test new/modified functionality in the Sandstorm dev environment.

    1. browse http://local.sandstorm.io:6080
  7. When ready, stop the development app (Ctrl-C) and clean the files list.

    1. ./clean-sandstorm-files.sh
  8. Pack the new SPK! :tada:

    1. 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:

  1. Follow the steps in the Development documentation above up to the
    vagrant-spk dev command.

  2. Stop the development app (Ctrl-C).

  3. Move in to the babybuddy folder.

    1. cd babybuddy
  4. Apply the patch using 3way merge so conflicts will be created.

    1. git apply --3way ../sandstorm.patch
  5. Resolve any conflicts and make additional changes as needed.

  6. Add all files to git.

    1. git add --all
  7. Create a diff of the changes and save it to sandstorm.patch.

    1. git diff HEAD > ../sandstorm.patch
  8. Return to the main repository folder and start the vagrant dev instance.

    1. cd ..
    2. vagrant-spk dev

If the patch update was successful, the new patch should apply cleanly during
the build phase.