-
Notifications
You must be signed in to change notification settings - Fork 340
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
Issue-89 [deploy/stack2] Log to file with uWSGI: #90
Merged
frol
merged 3 commits into
frol:master
from
MagicJohnJang:issue-89-log-to-file-with-uwsgi
Jan 16, 2018
Merged
Issue-89 [deploy/stack2] Log to file with uWSGI: #90
frol
merged 3 commits into
frol:master
from
MagicJohnJang:issue-89-log-to-file-with-uwsgi
Jan 16, 2018
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Log to /tmp/flask-stack2.log.{timestamp} (Use timestamp if file size over 100MB) * Enable volume `/tmp` in api-server container. * Mapping host and container within `/tmp` folder. Enable mutli-thread support.
1 similar comment
frol
requested changes
Dec 29, 2017
deploy/stack2/docker-compose.yml
Outdated
@@ -11,11 +11,13 @@ services: | |||
|
|||
api: | |||
restart: always | |||
volumes: | |||
- "/tmp:/tmp" |
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.
This doesn't look to me like a sane default. Let's drop this auto-mounting.
deploy/stack2/docker-compose.yml
Outdated
build: | ||
context: ../../ | ||
args: | ||
INCLUDE_UWSGI: 'true' | ||
environment: | ||
EXAMPLE_API_REVERSE_PROXY_SETUP: 'true' | ||
FLASK_CONFIG: 'production' | ||
command: 'uwsgi --need-app --manage-script-name --mount /=app:create_app() --uwsgi-socket 0.0.0.0:5000' | ||
command: 'uwsgi --need-app --manage-script-name --mount /=app:create_app() --uwsgi-socket 0.0.0.0:5000 --enable-threads --logger file:logfile=/tmp/flask-stack2.log,maxsize=104857600' |
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.
--enable-threads
should not be used unless there is a need as it hurts performance (it enables GIL).- Given that file logs are not that common in Docker environments I would rather prefer having the information about the logger in the README file. Could you document it there and revert the direct changes to the Dockerfile and docker-compose.yml?
frol
approved these changes
Jan 16, 2018
@MagicJohnJang Thank you! |
2 similar comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
/tmp
in api-server container./tmp
folder.Enable mutli-thread support.