-
Notifications
You must be signed in to change notification settings - Fork 69
Release v2.1 #537
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
Merged
Merged
Release v2.1 #537
Conversation
This file contains hidden or 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
Remove LazyRecoverable and dalli (and memcached)
The new production server does work the same way as staging and this hack is not needed anymore.
Require capistrano/rbenv always
So we can remove the following manual step from the deployment process: > 9. There is one last step though. Until we don't fix it, the app server needs to be restarted manually for the changes to be loaded. Run: > $ ssh timeoverflow@www.timeoverflow.org > $ sudo systemctl restart timeoverflow > $ sudo systemctl restart sidekiq Now Capistrano's output looks like: ``` INFO [fbff0613] Running /usr/bin/env rm -rf /var/www/timeoverflow/releases/20191220151536 as timeoverflow@staging.timeoverflow.org DEBUG [fbff0613] Command: ( export RBENV_ROOT="$HOME/.rbenv" RBENV_VERSION="" ; /usr/bin/env rm -rf /var/www/timeoverflow/releases/20191220151536 ) INFO [fbff0613] Finished in 0.183 seconds with exit status 0 (successful). INFO [9ab57c12] Running sudo systemctl reload timeoverflow as timeoverflow@staging.timeoverflow.org DEBUG [9ab57c12] Command: sudo systemctl reload timeoverflow INFO [9ab57c12] Finished in 0.218 seconds with exit status 0 (successful). INFO [41e063eb] Running sudo systemctl restart sidekiq as timeoverflow@staging.timeoverflow.org DEBUG [41e063eb] Command: sudo systemctl restart sidekiq INFO [41e063eb] Finished in 2.895 seconds with exit status 0 (successful). DEBUG [3772e021] Running if test ! -d /var/www/timeoverflow/releases; then echo "Directory does not exist '/var/www/timeoverflow/releases'" 1>&2; false; fi as timeoverflow@staging.timeoverflow.org DEBUG [3772e021] Command: if test ! -d /var/www/timeoverflow/releases; then echo "Directory does not exist '/var/www/timeoverflow/releases'" 1>&2; false; fi DEBUG [3772e021] Finished in 0.181 seconds with exit status 0 (successful). INFO [266848f2] Running echo "Branch reload-unicorn-after-deployment (at fad9dbd) deployed as release 20191220152039 by pau" >> /var/www/timeoverflow/revisions.log as timeoverflow@staging.timeoverflow.org DEBUG [266848f2] Command: echo "Branch reload-unicorn-after-deployment (at fad9dbd) deployed as release 20191220152039 by pau" >> /var/www/timeoverflow/revisions.log INFO [266848f2] Finished in 0.181 seconds with exit status 0 (successful). ``` Which generates the following log line ``` ==> log/unicorn.err.log <== E, [2019-12-20T16:20:59.911297 #32630] ERROR -- : reexec-ed child already running PID:1213 ```
This is the safest way to have the exact same config across these two envs. Keep in mind next will die in the upcoming days. Meanwhile, let's keep them in sync.
Symlink next env config to production's
Reload Unicorn and Sidekiq after deployment
We used to connect to it through the PostgreSQL URL but that ENV var is no longer present in the server and we have `DATABASE_NAME` instead. That's what we already used successfully with the `next` environment. This is required to deploy using the `production` environment or the app won't be able to connect to the DB.
Replace DATABASE_URL with DATABASE_NAME
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Creating a new release that includes the following changes: