Skip to content
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 basic Docker image #9

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

niekcandaele
Copy link

@niekcandaele niekcandaele commented Sep 22, 2020

Adds a really basic Docker image. Improvements are definitely possible but would require more code changes I believe.

Currently installs all the storage peer dependencies, there's probably a better way to handle that. Separate images perhaps?

Has a basic docker-compose file as well which is set up to use the local file storage. Uses a volume for persistence.

Closes #8

@niekcandaele niekcandaele changed the title Add basic Docker image Add basic Docker image - Fixes #8 Sep 22, 2020
@niekcandaele
Copy link
Author

Fixes #8

I'm doing something wrong linking the issue to the PR 😄

@WilsontheWolf
Copy link

WilsontheWolf commented Sep 28, 2020

I think its closes #8. mabey edit into the description of the original one

@niekcandaele niekcandaele changed the title Add basic Docker image - Fixes #8 Add basic Docker image Sep 28, 2020
Copy link
Owner

@zneix zneix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry to keep you waiting for so long, I had a rough week.

I've been trying to learn some more about docker to have some knowledge about how this is used and that's some cool stuff however I am unsure about few things and would like you to have a look at my comments.

.dockerignore Outdated Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
npm install [email protected] && \
npm install [email protected]

ENV HOST 0.0.0.0
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be defaulted to 127.0.0.1 to keep consistency with config? I prefer localhost over this solution to not open our app to whole internet and manage its access via proxying port 7777 with stuff like nginx.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would be controlled by the ports you set with the docker commands. By default no ports are exposed. You can still only open to localhost by binding 127.0.0.1:7777 or to all interfaces with 7777:7777.

If this is HOST 127.0.0.1 then you can only connect to it from inside the container.

@zneix
Copy link
Owner

zneix commented Oct 1, 2020

Improvements are definitely possible but would require more code changes I believe.

Would you mind to elaborate on what code changes would be needed? Maybe I could tweak some things to make haste run better with docker

@nmenon
Copy link

nmenon commented Oct 20, 2020

@niekcandaele any chance of a refresh?
@zneix will be great if you can add actions to the repo to auto deploy the docker image to dockerhub.

@niekcandaele
Copy link
Author

Sorry for dissapearing here, got really busy and lost track of this

Improvements are definitely possible but would require more code changes I believe.

Would you mind to elaborate on what code changes would be needed? Maybe I could tweak some things to make haste run better with docker

I was thinking mostly configuration via env vars instead of a config file. This current version will work if you add the config file via volumes but for containers it's generally easier to use env vars.

@zneix will be great if you can add actions to the repo to auto deploy the docker image to dockerhub.

Dockerhub can also automatically build images on git push. Actions are faster but require a bit more setup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Docker support
4 participants