Announcing the latest version of the Datica Platform, 3.2 is now generally available to all. Read more the full release notes here.

Custom Buildpacks

How can I modify the Platform buildpack process?

Datica has created several ways that users can modify the standard buildpack process to help them meet their application needs.

Dependencies Outside The Buildpack

Sometimes an application will have dependencies outside of the buildpack that cannot be retrieved by other means, such as Ruby gems. Datica provides the means to install software from the apt repositories for Ubuntu 14.04 on Pod02 and Ubuntu 12.04 on Pod01.

In your application repository, create a file at the following path:

/your_git_repository_root/.datica/packages

List the packages that you would like installed in your environment, one package per line, in the packages file. Keep in mind that these packages must be available in the base Ubuntu repositories. The standard location of binaries installed via this method is /usr/bin.

Pre and Post Build Hooks

On our Pod02 infrastructure, Datica has added the ability to run pre-build and post-build scripts during the application build process.

These scripts have access to the dedicated, encrypted network of your environment, which means that they can talk to the existing services such as databases or message brokers.

The scripts run as an unprivileged user with minimal permissions. They are able to write to your application’s working directory and run any software installed by the buildpack (e.g., bundle exec rake db:migrate) but not much else.

If either the pre- or post-build hook fails, the overall build will be marked as failed and your application will not be redeployed. However, any operations that were performed by your hook scripts will not be rolled back, so please exercise caution if you are performing database modifications during builds.

Build hook failures should be indicated in the usual non-zero exit code manner. If you are running a shell script as your hook you should strongly consider using #!/bin/sh -e or set -e.

Build executions have a time limit of 30 minutes, so be careful not to do anything overly lengthy with these scripts.

Pre-Build Hooks

The pre-build script should be located at /your_git_repository_root/.datica/pre-build. The file must be executable to run during the build process.

Keep in mind that the pre-build script runs before the buildpack, so most utilities (rake, npm, etc.) will not be available.

Post-Build Hooks

The pre-build script should be located at /your_git_repository_root/.datica/post-build. The file must be executable to run during the build process.

This is a common location to place database migration commands so that the running database is prepared prior to the new code base deployment.

See also

Cloud computing for healthcare

If you store, process, or transmit Protected Health Information, rely on Datica to keep you HIPAA compliant with our platform as a service, mobile backend, or managed HL7 integrations.

Contact Us Learn More

Datica learning resources

Learn the important and intracate details of HIPAA compliance, make use of HL7, and understand the security aspects of handling protected health information with our learning resources.

Visit Datica Learning Resources