-
Notifications
You must be signed in to change notification settings - Fork 746
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add tags to pups templates #751
Conversation
90fd0a0
to
3e28261
Compare
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.
08e16d9
to
96d1b10
Compare
run /root/install_postgres script for both startup and boot
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's get this merged!
It would be good to put some description of what the tags mean somewhere in the repo. Perhaps in templates/README.md
.
We are still on v3.1.5 as we are waiting for some plugins to be compatible with 3.2. This PR is preventing us from rebuilding Discourse:
Any workaround? |
In case this is useful for someone in the same situation, I managed to rebuild by checking out discourse/discourse_docker to the commit before this one and (for some other unrelated reason, I guess), commenting DISCOURSE_MAXMIND_LICENSE_KEY or else it was failing at another place. |
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 are default 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.