Skip to content
This repository was archived by the owner on Feb 16, 2023. It is now read-only.

Commit 3252802

Browse files
committed
Add deployment instructions
1 parent 5bf27e5 commit 3252802

File tree

4 files changed

+35
-2
lines changed

4 files changed

+35
-2
lines changed

Gemfile

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ ruby '2.6.5'
55

66
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
77
gem 'rails', '~> 6.0.1'
8+
gem 'mimemagic', github: 'mimemagicrb/mimemagic', ref: 'd5ebc0cd846dcc68142622c76ad71d021768b7c2'
89
# Use postgresql as the database for Active Record
910
gem 'pg', '>= 0.18', '< 2.0'
1011
# Use Puma as the app server

Gemfile.lock

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
GIT
2+
remote: https://github.com/mimemagicrb/mimemagic.git
3+
revision: d5ebc0cd846dcc68142622c76ad71d021768b7c2
4+
ref: d5ebc0cd846dcc68142622c76ad71d021768b7c2
5+
specs:
6+
mimemagic (0.3.3)
7+
18
GEM
29
remote: https://rubygems.org/
310
specs:
@@ -131,7 +138,6 @@ GEM
131138
marcel (0.3.3)
132139
mimemagic (~> 0.3.2)
133140
method_source (0.9.2)
134-
mimemagic (0.3.3)
135141
mini_mime (1.0.2)
136142
mini_portile2 (2.4.0)
137143
minitest (5.13.0)
@@ -262,6 +268,7 @@ DEPENDENCIES
262268
jbuilder (~> 2.7)
263269
jsonapi-resources
264270
listen (>= 3.0.5, < 3.2)
271+
mimemagic!
265272
pg (>= 0.18, < 2.0)
266273
puma (~> 4.1)
267274
rails (~> 6.0.1)

README.md

+25
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,28 @@ bundle exec rails s
3737
bin/webpack-dev-server
3838
yarn watch-typings
3939
```
40+
41+
### Deploy
42+
*Note: Ensure that `RAILS_ENV=production` is set for all of the following commands.*
43+
1. Install dependencies
44+
```
45+
bundle install
46+
yarn install
47+
```
48+
2. Generate Rails credentials
49+
```
50+
bundle exec rails credentials:edit
51+
```
52+
3. Setup database
53+
```
54+
bundle exec rails db:create
55+
bundle exec rails db:migrate
56+
```
57+
4. Precompile assets
58+
```
59+
bundle exec rails assets:precompile
60+
```
61+
5. Run application
62+
```
63+
bundle exec rails s
64+
```

config/environments/production.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
# config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ]
4545

4646
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
47-
# config.force_ssl = true
47+
config.force_ssl = true
4848

4949
# Use the lowest log level to ensure availability of diagnostic information
5050
# when problems arise.

0 commit comments

Comments
 (0)