-
Notifications
You must be signed in to change notification settings - Fork 744
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The purpose here is to allow greater flexibility in how and where docker images are built and run. It achieves this by breaking up build steps into distinct run steps which can be saved along the way. Customizable base images may then be prebuilt with as many batteries included as possible, with zero environment setup so those images can then be configured at a later stage. Add the ability to run partial pups configuration: `build`: build base image with no db - ember build. `precompile`: precompile stage that requires postgres and redis. `migrate`: run migration tasks. `db`: start bundled postgres/redis, if included. Adds a create_db script in postgres template for creating db on the fly. Called below in unicorn run: updates unicorn run command with 3 env flags: CREATE_DB_ON_BOOT: if 1, creates base db schema, allows for deferral of creation. MIGRATE_ON_BOOT: if 1, runs db:migrate - allows for deferral of db migration. PRECOMPILE_ON_BOOT: if 1, precompiles assets (without ember build). PRECOMPILE_ON_BOOT initially defaults to 1 in base builds (no tags). During the `precompile` build step, this updates the default to be 0. All other new flags default to 0 (off). With these three flags, we're now able to ship and start a container from a base image, and it'll be able to bootstrap a blank database. Updates hook to start redis before_db_migrate as before_code hook is not guaranteed to fire before migrate tasks if pups is filtered by tags.
- Loading branch information
1 parent
13dc0c7
commit 96d1b10
Showing
3 changed files
with
84 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters