File tree 2 files changed +30
-1
lines changed
2 files changed +30
-1
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ pairing with smart people at Hashrocket.
10
10
11
11
For a steady stream of TILs, [ sign up for my newsletter] ( https://crafty-builder-6996.ck.page/e169c61186 ) .
12
12
13
- _ 1575 TILs and counting..._
13
+ _ 1576 TILs and counting..._
14
14
15
15
See some of the other learning resources I work on:
16
16
- [ Ruby Operator Lookup] ( https://www.visualmode.dev/ruby-operators )
@@ -199,6 +199,7 @@ See some of the other learning resources I work on:
199
199
- [ Check The Status of All Services] ( devops/check-the-status-of-all-services.md )
200
200
- [ Check The Syntax Of nginx Files] ( devops/check-the-syntax-of-nginx-files.md )
201
201
- [ Connect To An RDS PostgreSQL Database] ( devops/connect-to-an-rds-postgresql-database.md )
202
+ - [ Default Rails Deploy Script On Hatchbox] ( devops/default-rails-deploy-script-on-hatchbox.md )
202
203
- [ Determine The IP Address Of A Domain] ( devops/determine-the-ip-address-of-a-domain.md )
203
204
- [ Hatchbox Exports Env Vars With asdf] ( devops/hatchbox-exports-env-vars-with-asdf.md )
204
205
- [ Path Of The Packets] ( devops/path-of-the-packets.md )
Original file line number Diff line number Diff line change
1
+ # Default Rails Deploy Script On Hatchbox
2
+
3
+ I deployed a Rails app to [ Hatchbox] ( https://hatchbox.io ) recently. When
4
+ following along in the log during a deploy, I can see most of what is happening
5
+ as part of the deploy. Though it is too verbose to look through every line. I'd
6
+ rather see the contents of the deploy script.
7
+
8
+ I did quite a bit of digging around while SSH'd into my hatchbox server, but I
9
+ couldn't find if or where that file might be stored.
10
+
11
+ Instead, there is a [ _ Help Center_
12
+ article] ( https://hatchbox.relationkit.io/articles/55-what-is-the-default-rails-deploy-script )
13
+ where Chris Oliver shares what is in the script.
14
+
15
+ ``` bash
16
+ bundle install -j $( nproc)
17
+ yarn install
18
+ bundle exec rails assets:precompile
19
+ [[ -n " ${CRON} " ]] && bundle exec rails db:migrate
20
+ ```
21
+
22
+ It does a parallelized ` bundle install ` , then a ` yarn install ` (make sure your
23
+ project is using ` yarn.lock ` ), Rails asset precompilation, and then if ` CRON `
24
+ is set (Cron role is available by checking _ Cron_ under _ Server
25
+ Responsibilities_ for your Hatchbox server), it will run Rails migrations.
26
+
27
+ From app settings, the deploy script can be overridden, or pre- and post-deploy
28
+ steps can be added.
You can’t perform that action at this time.
0 commit comments