terra_boi 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8e355c6ded18304b8a3b4ba91cd48e06c0b12996b363c82fcd44d2b616cc96aa
4
- data.tar.gz: 9499532c8f88a12c234884ddcb781067ce6ef2a5f0bcca174bf3bc6a4d3aaafd
3
+ metadata.gz: 0c71ba59ddff8f5b36195595e57b32504a54076357bc95768ac8c166caadae72
4
+ data.tar.gz: 23bf0e85ff850b45ee5568941656d668f490fbede1aa59d030f1338b3d663f53
5
5
  SHA512:
6
- metadata.gz: bcc07fe931bba6a57b0f305fece00b28f63ccfcb949d78229f223f9aafc9d74d4ccb106eb438a7f9aa3586e7564890df1a0246aa142d15854ff43f336d426fed
7
- data.tar.gz: 82ec085571de1b8a29d0059342de6cf3798071fac5046ba79c48d42aefca29fa90c9d64c57c3d7d477403b9c1b1fb83cae9dc703f4e8d5dbaac1fd21caf01be8
6
+ metadata.gz: 945a1c082d28dc45cb59ad4bfdb9b92bbb1bed05d1d00929f95e42b91de79af337bae0787890363f0e3140b65e2bba568e21cb0865eb2c6d07d780088be533d3
7
+ data.tar.gz: 598054da273d9e7951571720206c45e538e56ff43dac6e7b499171fe220e0985d3bb3a778c04f2502d5bcf78bab7e772f14f51ee8af9b3bf5a7a3af7bfd62c08
@@ -33,6 +33,7 @@ RUN bundle install
33
33
  ADD . $APP_HOME
34
34
 
35
35
  RUN yarn install --check-files
36
+ RUN RAILS_ENV=production rails assets:precompile
36
37
 
37
38
  EXPOSE 3000
38
39
 
@@ -20,7 +20,7 @@ variable "db_username" {}
20
20
  variable "db_password" {}
21
21
 
22
22
  module "db_and_s3" {
23
- source = "github.com/charliereese/terraform_modules//data?ref=v0.0.14"
23
+ source = "github.com/charliereese/terraform_modules//data?ref=v0.0.15"
24
24
 
25
25
  env = "<%= config[:env] %>"
26
26
  app_name = "<%= application_name %>"
@@ -1,4 +1,6 @@
1
1
  Rails.application.configure do
2
2
  config.hosts << '.<%= class_options[:domain_name] %>'
3
3
  config.hosts << '.amazonaws.com'
4
+ # Allow AWS health checks
5
+ config.hosts << /^\d+\.\d+\.\d+\.\d+/
4
6
  end
@@ -3,7 +3,7 @@
3
3
  # ---------------------------------------------------------------------------------------------------------------------
4
4
 
5
5
  module "remote_state_locking" {
6
- source = "github.com/charliereese/terraform_modules//state?ref=v0.0.14"
6
+ source = "github.com/charliereese/terraform_modules//state?ref=v0.0.15"
7
7
 
8
8
  app_name = "<%= application_name %>"
9
9
  region = "us-east-2"
@@ -17,7 +17,7 @@ terraform {
17
17
  # ---------------------------------------------------------------------------------------------------------------------
18
18
 
19
19
  module "webserver_cluster" {
20
- source = "github.com/charliereese/terraform_modules//web_servers?ref=v0.0.14"
20
+ source = "github.com/charliereese/terraform_modules//web_servers?ref=v0.0.15"
21
21
 
22
22
  instance_type = "t2.micro"
23
23
  env = "<%= config[:env] %>"
@@ -8,17 +8,22 @@ echo "DB_USERNAME=${db_username}" >> /etc/environment
8
8
  echo "RAILS_ENV=production" >> /etc/environment
9
9
  echo "INFRASTRUCTURE_ENV=${env}" >> /etc/environment
10
10
 
11
+ # Load ENV vars in current session
12
+ for line in $( cat /etc/environment ); do export $line; done
13
+
11
14
  # Set DB environment variables in docker container and
12
15
  # start rails container
13
- sudo docker container run -p 3000:3000 --name $APPLICATION_NAME --restart always -d \
16
+ docker container run -p 3000:3000 --name $APPLICATION_NAME --restart always -d \
14
17
  -e DB_HOST=$DB_HOST \
15
18
  -e DB_USERNAME=$DB_USERNAME \
19
+ -e DB_PASSWORD=$DB_PASSWORD \
16
20
  -e RAILS_ENV=$RAILS_ENV \
17
21
  -e INFRASTRUCTURE_ENV=$INFRASTRUCTURE_ENV \
18
22
  -e AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID \
19
23
  -e AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY \
20
24
  -e RAILS_MASTER_KEY=$RAILS_MASTER_KEY \
25
+ -e RAILS_SERVE_STATIC_FILES=true \
21
26
  $DOCKERHUB_USERNAME/$APPLICATION_NAME:latest
22
27
 
23
28
  # Run outstanding DB migrations
24
- docker container exec $APPLICATION_NAME RAILS_ENV=$RAILS_ENV rake db:migrate
29
+ docker container exec $APPLICATION_NAME rake db:migrate
@@ -1,3 +1,3 @@
1
1
  module TerraBoi
2
- VERSION = '0.0.5'
2
+ VERSION = '0.0.6'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: terra_boi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Charlie Reese
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-24 00:00:00.000000000 Z
11
+ date: 2019-09-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails