Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Docker build file #98

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM rails:latest

ARG GITHUB_TOKEN

RUN apt-get update
RUN gem install rdoc bundle
RUN mkdir -p /build/genieacs-gui

ADD . /build/genieacs-gui

WORKDIR /build/genieacs-gui
RUN cp config/graphs-sample.json.erb config/graphs.json.erb
RUN cp config/index_parameters-sample.yml config/index_parameters.yml
RUN cp config/summary_parameters-sample.yml config/summary_parameters.yml
RUN cp config/parameters_edit-sample.yml config/parameters_edit.yml
RUN cp config/parameter_renderers-sample.yml config/parameter_renderers.yml
RUN cp config/roles-sample.yml config/roles.yml
RUN cp config/users-sample.yml config/users.yml
RUN bundle

ENTRYPOINT ["rails", "s", "-b", "0.0.0.0"]
4 changes: 2 additions & 2 deletions config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
config.file_watcher = ActiveSupport::EventedFileUpdateChecker

# GenieACS API
config.genieacs_api_host = 'localhost'
config.genieacs_api_port = 7557
config.genieacs_api_host = ENV['GENIEACS_NBI_IP']
config.genieacs_api_port = ENV['GENIEACS_NBI_PORT']
config.genieacs_api_use_ssl = false
end
6 changes: 3 additions & 3 deletions config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# config.assets.css_compressor = :sass

# Do not fallback to assets pipeline if a precompiled asset is missed.
config.assets.compile = false
config.assets.compile = true

# `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb

Expand Down Expand Up @@ -85,7 +85,7 @@
config.active_record.dump_schema_after_migration = false

# GenieACS API
config.genieacs_api_host = 'localhost'
config.genieacs_api_port = 7557
config.genieacs_api_host = ENV['GENIEACS_NBI_IP']
config.genieacs_api_port = ENV['GENIEACS_NBI_PORT']
config.genieacs_api_use_ssl = false
end
4 changes: 2 additions & 2 deletions config/environments/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
# config.action_view.raise_on_missing_translations = true

# GenieACS API
config.genieacs_api_host = 'localhost'
config.genieacs_api_port = 7557
config.genieacs_api_host = ENV['GENIEACS_NBI_IP']
config.genieacs_api_port = ENV['GENIEACS_NBI_PORT']
config.genieacs_api_use_ssl = false
end