Closed michiels closed 5 years ago
@michiels Looks great! Can you add a few steps to the README on how to get this running for your local dev? Also can you explain how the following works:
@jvanbaarsen Yep! Good one. Will add a "Developing via Docker" or something like that to the README.
@michiels Can you also add a line to the CHANGELOG?
@jvanbaarsen Check out my latest changes. There's quite some commits after me testing all regular Rails commands to be executed like running tests, doing db migrations and modifying the Gemfile.
I've chosen to explain in README.md that you can take the route to open up a shell session in the local development container. That is the fastest/easiest way for many people to use the regular rails commands without having to type docker-compose
for commands like docker-compose run web rails db:migrate
all the time. Keeping one shell session to the container open while developing also reduced the need to stop/start the container all the time when you would run only individual commands in them.
@michiels I just tried running the container but got this error when doing the first docker-compose:
--2018-01-16 08:52:36-- https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2
Connecting to bitbucket.org (bitbucket.org)|104.192.143.3|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://bbuseruploads.s3.amazonaws.com/fd96ed93-2b32-46a7-9d2b-ecbc0988516a/downloads/396e7977-71fd-4592-8723-495ca4cfa7cc/phantomjs-2.1.1-linux-x86_64.tar.bz2?Signature=GOYk%2BSO3n6DdQ3P4upLnWXUR3k0%3D&Expires=1516093791&AWSAccessKeyId=AKIAIQWXW6WLXMB5QZAQ&versionId=null&response-content-disposition=attachment%3B%20filename%3D%22phantomjs-2.1.1-linux-x86_64.tar.bz2%22 [following]
converted 'https://bbuseruploads.s3.amazonaws.com/fd96ed93-2b32-46a7-9d2b-ecbc0988516a/downloads/396e7977-71fd-4592-8723-495ca4cfa7cc/phantomjs-2.1.1-linux-x86_64.tar.bz2?Signature=GOYk%2BSO3n6DdQ3P4upLnWXUR3k0%3D&Expires=1516093791&AWSAccessKeyId=AKIAIQWXW6WLXMB5QZAQ&versionId=null&response-content-disposition=attachment%3B%20filename%3D%22phantomjs-2.1.1-linux-x86_64.tar.bz2%22' (ANSI_X3.4-1968) -> 'https://bbuseruploads.s3.amazonaws.com/fd96ed93-2b32-46a7-9d2b-ecbc0988516a/downloads/396e7977-71fd-4592-8723-495ca4cfa7cc/phantomjs-2.1.1-linux-x86_64.tar.bz2?Signature=GOYk+SO3n6DdQ3P4upLnWXUR3k0=&Expires=1516093791&AWSAccessKeyId=AKIAIQWXW6WLXMB5QZAQ&versionId=null&response-content-disposition=attachment; filename="phantomjs-2.1.1-linux-x86_64.tar.bz2"' (UTF-8)
20 redirections exceeded.
@jvanbaarsen Allright! I can check. Can you try to run the wget on your own workstation (not in a container).
@michiels That seems to be working.
@jvanbaarsen Ok, i'm going to check in my docker-compose. What happens when you run docker-compose build
in the repository? Same thing?
@jvanbaarsen I'm getting the same. I'm checking what's going on.
@jvanbaarsen Turns out the URL I used was old and deprecated. Latest commits update the binary URL for phantomjs and are working here.
@michiels When trying to run docker-compose up
I get an access-denied error for the IC container.
@jvanbaarsen Can you screenshot/post the full output?
I did do a Docker login. Can it be that you need to mark the image as public?
@jvanbaarsen That's odd, it shouldn't try and fetch the image from remote, but it should build your local directory. Can you try "docker-compose build" first and then do "docker-compose up" again? Could be that I need to update the README for this case.
This PR is an addition to #237 and updates the proposed
docker-compose.yml
file to work for local Intercity development.This would mean that you don't have to install & configure Redis or Postgresql to run and develop Intercity locally. This is because the current working directory with the Git repository is mounted in the app directory in the container to run. So any changes you make on your local harddrive will be applied in the running container. Result: instant dev environment!
How it works:
Run this command to start your local dev environment:
No need to have Postgres or Redis running on your host machine. Also benefit: Your Redis DB won't be shared between apps anymore so you always have a clean Redis queue for your Sidekiq jobs..
If you also want to start Redis:
Changes
config/initializations/secret_token.rb
to deal with empty SECRET_KEY_BASE strings in Redis.Todo