-
Notifications
You must be signed in to change notification settings - Fork 208
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
Get Mapknitter running into the Google Cloud. #1260
Conversation
* Add coveralls * Fix gemfile * Fix env variable * Add coveralls token * Update README.md
* Shortening docker image in ~30% * Caching bundle, gathering env variables and using newer sintax * Creating startup script and env file * Improving travis CI configuration * Loading assets in production env * Allow uglifier to interpret ES6 * Don't dettach when building container in travis * Fix start command * Fix travis script * Try to resolve travis tests invocation * Tweak travis script * Add delay * Bundle install before db setup * Shortening docker image in ~30% * Caching bundle, gathering env variables and using newer sintax * Creating startup script and env file * Improving travis CI configuration * Loading assets in production env * Allow uglifier to interpret ES6 * Fix start command * Fix travis script * Tweak travis script * Add delay * Revert assets changes * Return to Mysql5.7 * Tweak travis script * Fix make redeploy-container command * Add db migrate and precompile step. * Add bower install to Makefile * Clean after docker run. Avoid one bower run.
* Dynamic port in compose file * Omit setting container name * Add initial sql dump entry * Avoid resetting database on build
* Switch back to Debian 9 Stretch * Simplify docker image * Bump Ruby to 2.4.6 * Re-add dependency * Add dependency (zip) * Try pip install gdal * Install libgdal-dev * Revert attept to use pip * Bump ruby * Avoid naming containers in compose file * Avoid overwriting database on redeploy-container * Allow to load mysql dump * Include own GDAL packages * Disable ipv6 to prevent error * Add missing Amazon S3 yml to Makefile * Document unstable instance
Code Climate has analyzed commit 71d97ec and detected 0 issues on this pull request. View more on Code Climate. |
docker-compose build | ||
|
||
deploy-container: | ||
docker-compose run --rm web bash -l -c "sleep 10 && bower install --allow-root && rake db:setup && rake db:migrate && rake assets:precompile" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The wait_for_container()
method dismisses the need of ...sleep 10...
, in MK we're not using Bower anymore, I remember we've switched to Yarn a while ago. Also, I think those commands such as rake *
commands are already defined at the script.sh
file, here -> https://github.com/publiclab/mapknitter/blob/main/start.sh.
username: mapknitter | ||
password: mapknitter | ||
database: mapknitter | ||
host: <%= ENV.fetch('DB_HOST') || 'db' %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think here should be ENV.fetch("MYSQL_HOST") { 'db' }
, that's a env.fetch()
notation. It get db
as the value for MYSQL_HOST
, if not defined. Either this or ENV.fetch("MYSQL_HOST", "db")
will work. https://ruby-doc.org/core-2.5.0/ENV.html#method-c-fetch
|
||
if [ -f $pidfile ] ; then | ||
>&2 echo 'Server PID file already exists. Removing it...'; | ||
rm $pidfile; | ||
fi | ||
|
||
forego start | ||
bundle exec rails s -p $PORT -b '0.0.0.0' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to run rails using Forego otherwise ActionCable won't work. Check out cee7479
@@ -5,7 +5,6 @@ | |||
SimpleCov.formatter = SimpleCov::Formatter::Codecov | |||
SimpleCov.start | |||
|
|||
require "rack_session_access/capybara" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think system tests will work with this missing 🤔
public/tms/* | ||
db/schema.rb | ||
*.db | ||
<<<<<<< HEAD |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You got merge conflicts here
This is currently tested running at unstable.mapknitter.org.
rake test
@publiclab/mapknitter-reviewers
for help, in a comment belowIf tests do fail, click on the red
X
to learn why by reading the logs.Please be sure you've reviewed our contribution guidelines at https://publiclab.org/contributing-to-public-lab-software
Thanks!