Skip to content

Commit

Permalink
Try setting an ENTRYPOINT to get rbenv
Browse files Browse the repository at this point in the history
  • Loading branch information
snickell committed Sep 6, 2023
1 parent fb5fabc commit 7ebdbeb
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 4 deletions.
7 changes: 3 additions & 4 deletions k8s/code.org.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -261,9 +261,8 @@ COPY --chown=${UID} --from=code.org-rbenv ${SRC}/Gemfile ${SRC}/Gemfile
#
# DONE HACK WORKAROUNDS FOR APPLE SILICON

SHELL [ "zsh", "-l", "-c" ]
SHELL [ "zsh", "-ic" ]

ENTRYPOINT [ "zsh", "-ic" ]
# CMD tail -f /dev/null
CMD \
eval "$(rbenv init -)" && \
./bin/dashboard-server
CMD [ "./bin/dashboard-server" ]
36 changes: 36 additions & 0 deletions k8s/setup-db.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/bin/bash

eval "$(rbenv init -)"


# Dir.chdir(dashboard_dir) do
# RakeUtils.bundle_install
# puts CDO.dashboard_db_writer
# if ENV['CI']
# # Prepare for dashboard unit tests to run. We can't seed UI test data
# # yet because doing so would break unit tests.
# RakeUtils.rake 'db:create db:test:prepare'
# else
# RakeUtils.rake_stream_output 'dashboard:setup_db', ([:adhoc, :development].include?(rack_env) ? '--trace' : nil)
# end
# end

cd dashboard

# This is used by the dashboard unit tests and is much faster.
# Do we need to seed UI test data by default?
# bundle exec rake db:create db:test:prepare

bundle exec rake dashboard:setup_db
cd ..

# Dir.chdir(pegasus_dir) do
# RakeUtils.bundle_install
# RakeUtils.rake 'pegasus:setup_db'
# end

cd pegasus
bundle exec rake pegasus:setup_db

echo
echo "DB setup complete."

0 comments on commit 7ebdbeb

Please sign in to comment.