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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docker container definition #20
Conversation
@filipeforattini Thanks so much for taking this on!!! Couple notes/questions:
|
Hey! How are ya? Don't worry! I've just updated using the new dependencies you set! :) Well, about your question: I don't know if I fully understood (sry :/). You don't need to have a Docker Hub account because anyone can build locally and tag their own way. But wouldn't it be nice to have an official release? Take node's repository: https://hub.docker.com/_/node/. You could create an official https://hub.docker.com/_/ontrack/ or a common https://hub.docker.com/inoda/ontrack/ both for free. 馃槃 Anyway, your docker definition is not attached to a docker registry by code. That's why you will have Let me know if there is anyway I can help you! :) |
Hey! If you don't want to use Docker Hub, you can always use GitHub itself - https://docs.github.com/en/packages/using-github-packages-with-your-projects-ecosystem/configuring-docker-for-use-with-github-packages GitHub Actions can automatically build and push the image to the GitHub registry, and this is something I can help with if this is something you'd like to consider. |
@luketainton Sure! Could you test out the docker config in this PR too? If it works well I'll get this PR merged :) |
Sure thing - I'll give it a go and let you know how it goes 馃檪 |
Hi @inoda and @filipeforattini! I tried to run the app using the docker-compose.yml file included in this PR. The app builds OK, but won't actually start. This is the log output:
I tried manually executing |
@luketainton @filipeforattini I bet the issue is this conflict on |
@inoda that didn't work - I'm getting similar errors:
|
@luketainton Weird...I'm really not familiar with docker but this is just a standard Rails 6 app. I did some quick googling and found this - might be helpful: rails/webpacker#1568 |
This issue has suggested not using yarn.lock and having the container generate it:
I'll try this and see what happens. |
OK, even without the
|
@luketainton Oh I think the issue is that this tries to start the app in the |
I get this error, then the container exits: My experience with Ruby is non-existent - what file(s) do I need to edit? I can't run that command in the container as it doesn't have an editor installed. |
@luketainton I was also trying to make this work, and I think you can set the environment:
NODE_ENV: production
RAILS_ENV: production
DATABASE_URL: postgres://ontrack:secret@db/ontrack
SECRET_KEY_BASE: <a random string I generated as the secret key> I am not familiar with Rails either, so I am not sure if it's the "correct" way to resolve this, but it works :) |
@luketainton Any luck with this? I think you can generate a value for
|
To be honest I'd tried a few times without any luck so I was starting to get a little disheartened, but I'll give it another go and let you know what happens. |
Hey guys! Excuse me please, I've should have helped you guys before, I've forgotten about this PR. disappointed @luketainton & @inoda @luketainton & @hkalexling environment:
NODE_ENV: development
RAILS_ENV: development
SECRET_KEY_BASE: super-secret
DATABASE_URL: postgres://ontrack:secret@database/ontrack Take care for a production environment that right now requires SSL connection. You can follow this config up at: #config/environments/production.rb
config.force_ssl = true Can you guys give it another try on your tests? I hope we will have some progress! 馃槂 |
I'm seeing the following errors on my app container:
The postgres container is spinning up fine. I'll try switching to |
Ok, there is different behaviour. It seems to run the db migrations and start the application, but I get a 500 error when trying to access it. Logs below.
|
Hey @luketainton, I'd suggest for a local environment wipe. You may accomplish that with the following: $ docker-compose down -v
# database-wise wipe
$ docker-compose build --no-cache
# recreates your app container with the right dependencies
$ docker-compose up -d I fully tested with a |
Hi @filipeforattini, I tried your fork but I got the |
See #36 |
Hey @inoda, nice to meet you!
First of all, your project is amazing! I was wondering on the internet and by accident discovery it.
Well, I saw few comments - as issues - to make it "containable" so I tried to help! 馃槈
I'd suggest as next steps for you to create your account at Docker Hub and make it available as a public container!
Keep the good work, you rock