Skip to content

Commit

Permalink
Update config.hosts for GitPod (forem#8677)
Browse files Browse the repository at this point in the history
* fake gitpod dockerfile commit

* install ruby 2.7.1 to different directory

* remove fakevar

* affix node version to 12.16.3

* try setting explicit version

* Add GitPod workspace URL to config.hosts

Co-authored-by: snackattas <zach.attas@gmail.com>
  • Loading branch information
citizen428 and snackattas authored Jun 15, 2020
1 parent 5e42e36 commit ac3c12f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .gitpod.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@ FROM gitpod/workspace-postgres

# Install Ruby
ENV RUBY_VERSION=2.7.1
RUN rm /home/gitpod/.rvmrc && touch /home/gitpod/.rvmrc && echo "rvm_gems_path=/home/gitpod/.rvm" > /home/gitpod/.rvmrc
RUN bash -lc "rvm install ruby-$RUBY_VERSION && rvm use ruby-$RUBY_VERSION --default"

# Install Node
ENV NODE_VERSION=12.16.3
RUN bash -lc ". .nvm/nvm.sh && nvm install $NODE_VERSION"

# Install Redis.
RUN sudo apt-get update \
&& sudo apt-get install -y \
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
12.16
12.16
3 changes: 3 additions & 0 deletions config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@
config.action_mailer.perform_caching = false

config.hosts << ENV["APP_DOMAIN"] unless ENV["APP_DOMAIN"].nil?
if (gitpod_workspace_url = ENV["GITPOD_WORKSPACE_URL"])
config.hosts << URI.parse(gitpod_workspace_url).host
end
config.app_domain = "localhost:3000"

config.action_mailer.default_url_options = { host: "localhost:3000" }
Expand Down

0 comments on commit ac3c12f

Please sign in to comment.