-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Add Docker #164
Comments
@liyasthomas |
We're already making use of Travis CI for deployments. And I'm not experienced with docker. Would you care to explain docker CD advantages over other CIs? |
the requirement is: This account needs to exist so the image can be published there. Then the image needs to be pushed there. It's probably possible to do this with Travis, but it would require that to be setup in Travis. (Ie add a token for docker hub in Travis) If docker hub is used, the process is easier. Just link your GitHub account from docker hub and it will watch for new releases. When a new release is published, it builds the image using the docker file and publishes it. |
Cool! Let me do a background check on it and will let you know. |
Closed by accident |
@jgroom33 |
Works great. Now just need to update the readme with: |
Will do |
@jgroom33 can you tell me why docker taking ~12 mins to build? Any optimizations you wanna suggest to |
Where are you seeing the 12 minutes? |
Build duration was 12 mins. |
Another improvement might be to use tini and switching from "npm run start" to directly executing the nuxt command. Just add "tini" to the
Another nice to have feature might be a healthcheck, something like this:
I am not entirely sure how nuxt works and what dependencies it needs for runtime but maybe it could further slim down the resulting image by using a multi stage build so you would prepare everything for the |
Sorry to comment under a closed issue, but in response to the previous comment I tried this Dockerfile:
I added tini as suggested and I also took the liberty to add ca-certificates. I usually build this Dockerfile by using two different commands in sequence: The image got shrunk down to 303MB, which is not bad for a nodejs application this large but probably you could still improve it by installing production dependencies only (for example you don't need test suite in production) as suggested by @jls-tschanzc |
it would be nice to have no install dependencies except docker.
expected behavior:
docker run -it -p 3000:3000 liyasthomas/postwoman:latest
The text was updated successfully, but these errors were encountered: