-
Notifications
You must be signed in to change notification settings - Fork 0
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 development docker w/ postgres #2
base: main
Are you sure you want to change the base?
Conversation
RUN pip install -r requirements.txt | ||
COPY . . | ||
|
||
CMD ["python", "app.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.
There is a 'proper' way to run flask using the Flask CLI, which we could set as an entrypoint (and then pass in any args we want via docker-compose or manually running the container), but that's not strictly necessary.
At some point in the future we should rejig this (or have a separate production dockerfile) to use a WSGI server, see the flask docs on deployment
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.
The idea here is to 100% have a separate production dockerfile, so I'm happy running in debug here.
Flask API for running could be nicer I agree.
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.
It also looks like you can do some other nice things like custom commands that have access to app context which we might want to use in the future to make administering jacob easier. But I still think having a sane __name__="__main__"
block for running without the CLI makes sense to have.
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.
That's probably going to be needed for "first time DB setup" (and migrations? but i'm gonna pretend we'll never need to do migrations)
No description provided.