From 91ebd559b11ccf411b97d8142d7c7017ff413d98 Mon Sep 17 00:00:00 2001 From: Anna Liisa Moter Date: Wed, 17 Feb 2021 10:35:49 -0800 Subject: [PATCH 1/3] FIR-167 update readme with instructions for setting rails masterkey --- .gitignore | 3 +++ README.md | 24 ++++++++++++++++-------- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 6bf7f5dfb..084bd97b0 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,6 @@ public/assets release.sh coverage .ruby-version + +# Ignore master key for decrypting credentials and more. +/config/master.key diff --git a/README.md b/README.md index 5d5dd00ec..665a39ac4 100644 --- a/README.md +++ b/README.md @@ -16,21 +16,29 @@ Heaven currently supports [Capistrano][15], [Fabric][10], and [Heroku][22] deplo To make any changes to Heaven, you'll need Docker installed locally. -First, make you changes to Heaven and open a pull request. -Make sure your CircleCI build is green. -Build the new docker image locally in your branch to make sure it works: -`Docker build .` -Merge your PR to master. +### Adding rails masterkey + +With the change to rails 5, in order to successfully build a docker image, you will need to add a rails masterkey locally. This will only need to be done once. + +1. Grab the Heaven rails masterkey from our shared 1password vault +2. run `EDITOR="vim" bin/rails credentials:edit` to edit the master key file and paste in the masterkey you copied from the vault. -Then: -push your local changes to Docker registry using the release script: +### Next steps for making changes + +1. make your changes to Heaven and open a pull request. +2. Make sure your CircleCI build is green. +3. Build the new docker image locally in your branch to make sure it works: +`Docker build .` +4. Merge your PR to master. +5. Checkout master and pull. +6. Push your changes to Docker registry using the release script: ```(sh) cd heaven script/release ``` -Then deploy the latest Docker image to our environment: +7. Then deploy the latest Docker image to our environment: ```(sh) cd aws-deploy-brainy From 0ebaca12d995bd1d21bec9d4266bb43022bd8712 Mon Sep 17 00:00:00 2001 From: Anna Liisa Moter Date: Wed, 17 Feb 2021 10:46:49 -0800 Subject: [PATCH 2/3] FIR-167 remove unnecessary command from Dockerfile --- Dockerfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3598a6656..3ef947f1c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,7 +13,6 @@ COPY Gemfile.lock $WORK_DIR/Gemfile.lock RUN gem install bundler -v '1.17.3' RUN cd $WORK_DIR && bundle install - RUN apt-get update && \ apt-get install -y apt-transport-https && \ curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \ @@ -28,7 +27,6 @@ RUN apt-get update && \ COPY . $WORK_DIR WORKDIR $WORK_DIR -RUN bundle exec rails db:environment:set RAILS_ENV=production EXPOSE 80 ENTRYPOINT ["bundle", "exec"] From 6d540927247ae2e97dda88b2f9fa07da7d0b53fb Mon Sep 17 00:00:00 2001 From: Anna Liisa Moter Date: Wed, 17 Feb 2021 11:07:03 -0800 Subject: [PATCH 3/3] specify the right vault FIR-167 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 665a39ac4..dd9842a48 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ To make any changes to Heaven, you'll need Docker installed locally. With the change to rails 5, in order to successfully build a docker image, you will need to add a rails masterkey locally. This will only need to be done once. -1. Grab the Heaven rails masterkey from our shared 1password vault +1. Grab the Heaven rails masterkey from our shared 1password Infra vault 2. run `EDITOR="vim" bin/rails credentials:edit` to edit the master key file and paste in the masterkey you copied from the vault. ### Next steps for making changes