Use UID
(or --user
in run) flag on Linux as follows, so docker creates files with host user as the owner
docker/compose#1532
UID=$(id -u) docker-compose run website bin/install
Two options:
- Attach to running server container with
docker attach $(docker-compose ps | grep website_1 | awk '{print $1}')
- Run server with this command instead of
docker-compose up
UID=$(id -u) docker-compose run --use-aliases --service-ports website
See spec/rails_helper.rb
You want to run feature tests in live mode and see how they go
Two options:
- on your local machine
LIVE_CHROME=true rspec spec/features/reports_spec.rb
- via VNC (not implemented) https://hub.docker.com/r/siomiz/chrome/
- wkhtmltopdf
- wkhtmltopdf-binary - "file not found", alpine doesn't have some shared libraries
- apk add wkhtmltopdf - blank page rendered
- remove password for postgres
- run chrome via VNC for tests
Base structure https://nickjanetakis.com/blog/dockerize-a-rails-5-postgres-redis-sidekiq-action-cable-app-with-docker-compose
database.yml
and some other configs
https://github.com/nickjj/orats
Some hints (rm pidfile
)
https://docs.docker.com/compose/rails/