-
Notifications
You must be signed in to change notification settings - Fork 5
Basic Docker setup #10
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
base: master
Are you sure you want to change the base?
Conversation
Sorry for not answering this for so long. I have personally no experience with docker so I am not really sure on how to handle this. |
FROM python:2.7 | ||
RUN apt update | ||
RUN apt upgrade -y | ||
RUN apt install vim -y |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you combine this?
RUN apt update &&
8000
amp; apt upgrade -y && apt clean
And why vim?
RUN apt install vim -y | ||
RUN mkdir /sabot | ||
WORKDIR /sabot | ||
ADD . /sabot |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you resort this, this could save some layers:
ADD . /sabot WORKDIR /sabot
- sabot/settings.py | ||
- sabot/conferenceSettings.py | ||
- sabot/localSettings.py (and sabot/prodSettings.py if you want to distinguish a development and a production version) from their example files (prodSettings.py needs the same parameters) | ||
- Make sure that `PROJECT_ROOT = '/sabot'` is set in sabot/localSettings.py (or sabot/prodSettings.py) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please mount them using volume mounts or something like this, don't compile them into the docker image.
WORKDIR /sabot | ||
ADD . /sabot | ||
RUN pip install -r requirements.txt | ||
EXPOSE 8000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is there no ENTRYPOINT or CMD in here? bash in a container is not how containers should be used
It's been a while but I added some remarks @derchrisuk |
This PR is for a basic setup to run the server instance in a Docker container.
It is using gunicorn for the WSGI server.