pass github token as runtime arg

v2
bruckwubete 5 years ago
parent adeb844918
commit 930ed809f5
  1. 3
      Dockerfile
  2. 4
      config/initializers/omniauth.rb

@ -6,7 +6,8 @@ RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs
# Set an environment variable for the install location.
ENV RAILS_ROOT /usr/src/app
#Add token for private gems
RUN bundle config github.com ENV['GITHUB_TOKEN']
ARG GITHUB_TOKEN
RUN bundle config github.com $GITHUB_TOKEN
# Make the directory and set as working.
RUN mkdir -p $RAILS_ROOT

@ -12,8 +12,8 @@ Rails.application.config.omniauth_bn_launcher = (ENV["USE_LOADBALANCED_CONFIGURA
Rails.application.config.middleware.use OmniAuth::Builder do
if Rails.env.production?
provider :bn_launcher,
client_id: ENV['BN_LAUNCHER_CLIENT_ID'],
client_secret: ENV['BN_LAUNCHER_CLIENT_SECRET'],
client_id: ENV['CLIENT_ID'],
client_secret: ENV['CLIENT_SECRET'],
client_options: {site: ENV['BN_LAUNCHER_REDIRECT_URI']}
end