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 development docker w/ postgres #2

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

Add development docker w/ postgres #2

wants to merge 3 commits into from

Conversation

mxbi
Copy link
Member

@mxbi mxbi commented Jan 27, 2023

No description provided.

@mxbi mxbi requested a review from swedgwood January 27, 2023 18:42
RUN pip install -r requirements.txt
COPY . .

CMD ["python", "app.py"]
Copy link
Collaborator

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

Copy link
Member Author

@mxbi mxbi Jan 27, 2023

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.

Copy link
Collaborator

@swedgwood swedgwood Jan 27, 2023

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.

Copy link
Member Author

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)

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.

2 participants