Skip to content

Commit 3f8e79e

Browse files
committed
Fixed bug in nginx
Continued development on deploy
1 parent ba373e7 commit 3f8e79e

File tree

4 files changed

+18
-8
lines changed

4 files changed

+18
-8
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,5 @@ public/assets
1919

2020
.idea/
2121

22-
config/database.production.yml
22+
config/database.production.yml
23+
config/secrets.yml

config/deploy/production.rb

+15-6
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@
2424

2525
task :upload_shared do
2626
on roles(:all) do
27+
puts shared_path
2728
upload! 'config/shared/', shared_path, recursive: true
29+
puts shared_path
30+
execute :mv, "#{shared_path}/shared/* #{shared_path}/"
31+
puts shared_path
2832
end
2933
end
3034

@@ -33,15 +37,20 @@
3337
within release_path do
3438
# noinspection RubyArgCount
3539
with rails_env: fetch(:rails_env) do
36-
secret = capture(:rake, 'secret')
37-
info "The production secret is '#{secret}'"
40+
production = capture(:rake, 'secret')
41+
development = capture(:rake, 'secret')
42+
test = capture(:rake, 'secret')
43+
info "The production secret is '#{production}'"
44+
info "The development secret is '#{development}'"
45+
info "The test secret is '#{test}'"
3846
secrets = "production: \n"
39-
secrets += " secret_key_base: #{secret}"
47+
secrets += " secret_key_base: #{production} \n"
48+
secrets += "development: \n"
49+
secrets += " secret_key_base: #{development} \n"
50+
secrets += "test: \n"
51+
secrets += " secret_key_base: #{test} \n"
4052

4153
execute :echo, "-e '#{secrets}' > #{release_path}/config/secrets.yml"
42-
43-
# execute :echo, "'production: ' > #{release_path}/config/secrets.yml"
44-
# execute :echo, "' secret_key_base: #{secret}' >> #{release_path}/config/secrets.yml"
4554
end
4655
end
4756
end
File renamed without changes.

config/shared/nginx.conf

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ server {
1919
proxy_redirect off;
2020
proxy_pass http://app;
2121
}
22-
location @app {
22+
location @dev {
2323
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
2424
proxy_set_header Host $http_host;
2525
proxy_redirect off;

0 commit comments

Comments
 (0)