Skip to content

Commit

Permalink
Changes requested by @yivo
Browse files Browse the repository at this point in the history
  • Loading branch information
Yaroslav Savchuk authored and yivo committed Jan 10, 2018
1 parent 301129d commit 6af0438
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 27 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ RUN su app -s /bin/bash -c "bundle install --path /opt/vendor/bundle"
# Copy the main application.
COPY . $APP_HOME

RUN chown -R app:app /home/app
RUN chown -R app:app /home/app && \
mv config/database.yml.example config/database.yml
USER app

RUN bundle exec rake tmp:create assets:precompile
Expand Down
4 changes: 2 additions & 2 deletions config/charts/barong/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ It is pre-install hook, so we don't have secrets created yet and we need to use
- name: COOKIES_SECRET_KEY
value: ""
{{- if .Values.db.password }}
- name: DATABASE_PASS
- name: DATABASE_PASSWORD
value: {{ .Values.db.password }}
{{- end }}
{{- end -}}
Expand Down Expand Up @@ -66,7 +66,7 @@ Environment for barong container
name: {{ template "fullname" . }}
key: cookiesSecretKey
{{- if .Values.db.password }}
- name: DATABASE_PASS
- name: DATABASE_PASSWORD
valueFrom:
secretKeyRef:
name: {{ template "fullname" . }}
Expand Down
21 changes: 0 additions & 21 deletions config/database.yml

This file was deleted.

12 changes: 9 additions & 3 deletions config/database.yml.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ default: &default
adapter: mysql2
encoding: utf8
pool: <%= ENV.fetch('RAILS_MAX_THREADS', 5) %>
username: <%= ENV['DATABASE_USER'] %>
password: <%= ENV['DATABASE_PASSWORD'] %>

# Optional variables may be omitted in development environment.
username: <%= ENV.fetch('DATABASE_USER', 'root') %>
password: <%= ENV.fetch('DATABASE_PASSWORD', 'root') %>

development:
<<: *default
Expand All @@ -15,4 +17,8 @@ test:

production:
<<: *default
database: barong_production

# Mandatory variables. Must be set in environment.
database: <%= ENV.fetch('DATABASE_NAME') %>
username: <%= ENV.fetch('DATABASE_USER') %>
password: <%= ENV.fetch('DATABASE_PASSWORD') %>

0 comments on commit 6af0438

Please sign in to comment.