利用qq邮箱作为个人邮件服务器发送邮件
socketio与apscheduler并用

docker运行gunicorn看不到控制台输出

妙音 posted @ 2019年4月06日 07:59 in python with tags docker flask websocket gunicorn , 3538 阅读

问题描述

 
项目做成了docker镜像, 以gunicorn命令运行, print输出为什么没有写到docker日志?
 
<!--more-->
 
* docker-compose文件如下
 
version: '2'
services:
  xxx.xxx:
    image: xxx:1.0
    volumes:
        - /usr/share/zoneinfo/Asia/Shanghai:/etc/localtime
        - ./log/xxx:/var/log/xxx
        - ./xxx:/app
    ports:
      - "5000:5000"
    environment:
      - FLASK_ENV=development_wyq
    command: gunicorn --worker-class eventlet -w 1 xxx:app -b 0.0.0.0:5000      # print不写到控制台
    #command: gunicorn --worker-class eventlet -w 1 xxx:app -b 0.0.0.0:5000 --access-logfile -   #print写到控制台
 
 

解决方法

 
在命令上加上"--access-logfile -"
 
来源 
 
此生必看的科学实验-水知道答案
《了凡四训》详解之改过之法
印光大师十念法(胡小林主讲第1集)
精神病为什么治不好
百病之源
 
Avatar_small
Zeeworld 说:
2019年9月02日 01:36

This is a brilliant blog! I'm very happy with the comments!..

Avatar_small
Bitcoin Price 说:
2019年9月23日 01:27

Good to become visiting your weblog again, it has been months for me. Nicely this article that i've been waited for so long. I will need this post to total my assignment in the college, and it has exact same topic together with your write-up. Thanks, good share.

Avatar_small
f88tw 说:
2019年10月27日 11:11

敬启者:个人小网站希望大家多多支持 感谢您对我们热心的支持 f88tw┃华歌尔┃I appreciate your kind assistance. http://mypaper.pchome.com.tw/f88tw/P1 http://mypaper.pchome.com.tw/f88tw/post/1379131888 http://mypaper.pchome.com.tw/f88tw/post/1370781143|墓园|禁忌|捡骨师|新竹|台北|桃园|苗栗|头份|

Avatar_small
f88tw┃华歌尔 说:
2019年12月28日 08:43

敬启者:个人小网站希望大家多多支持 感谢您对我们热心的支持 f88tw┃华歌尔┃I appreciate your kind assistance. f88tw|墓园|捡骨流程|捡骨费用|捡骨时间|禁忌|捡骨颜色|捡骨师|新竹|时间|台北|桃园|苗栗|头份|火化|晋塔|安葬|法事|捡骨|看日子|墓穴|墓园|坟墓

Avatar_small
Barbers Birmingham 说:
2020年1月05日 23:22

have you seen those Thriller Video with the prison inmates, geez those are very nice’

Avatar_small
토토 说:
2020年1月05日 23:22

Thanks for the sensible critique. Me and my neighbor were just preparing to do some research on this. We got a grab a book from our area library but I think I learned more clear from this post. I’m very glad to see such great information being shared freely out there.

Avatar_small
Fitzrovia barbers 说:
2020年1月30日 15:26

I was also reading a topic like this one from another site.`’”:;


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter