Commit 7079567c authored by kaiyou's avatar kaiyou Committed by GitHub

Merge pull request #1 from y0no/master

Make tedimg build again
parents 1a903edd 3af1aef4
......@@ -11,10 +11,11 @@ RUN apk add --no-cache nodejs \
&& rm -rf node_modules \
&& apk del nodejs
RUN apk add --no-cache --virtual build-dep gcc libjpeg-turbo-dev zlib zlib-dev \
RUN apk add --no-cache --virtual build-dep gcc linux-headers libc-dev \
&& apk add --no-cache jpeg-dev zlib-dev \
&& pip install -r /app/requirements.txt \
&& apk del build-dep
EXPOSE 80
CMD /usr/bin/supervisord -c /config/supervisor.conf
CMD /usr/bin/supervisord -c /app/docker/supervisor.conf
user www-data;
user nginx;
worker_processes 4;
pid /run/nginx.pid;
daemon off;
......@@ -33,26 +33,16 @@ http {
}
location /static {
root /tedimg;
root /app/tedimg;
}
location / {
uwsgi_pass unix:///app.sock;
uwsgi_param QUERY_STRING $query_string;
uwsgi_param REQUEST_METHOD $request_method;
uwsgi_param CONTENT_TYPE $content_type;
uwsgi_param CONTENT_LENGTH $content_length;
uwsgi_param REQUEST_URI $request_uri;
uwsgi_param PATH_INFO $document_uri;
uwsgi_param DOCUMENT_ROOT $document_root;
uwsgi_param SERVER_PROTOCOL $server_protocol;
uwsgi_param HTTPS $https if_not_empty;
uwsgi_param REMOTE_ADDR $remote_addr;
uwsgi_param REMOTE_PORT $remote_port;
uwsgi_param SERVER_PORT $server_port;
uwsgi_param SERVER_NAME $server_name;
proxy_pass http://127.0.0.1:8000/;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
}
......@@ -8,5 +8,6 @@ command=nginx -c /app/docker/nginx.conf
redirect_stderr=true
[program:flask]
command = /usr/local/bin/uwsgi --ini /app/docker/uwsgi.conf
directory=/app
command = gunicorn -w 4 -b 127.0.0.1:8000 tedimg:app
redirect_stderr=true
[uwsgi]
ini = :base
socket = /app.sock
master = true
processes = 4
[base]
chdir = /
module=tedimg:app
chmod-socket=666
Flask==0.10.1
itsdangerous==0.24
Jinja2==2.8
MarkupSafe==1.0
Pillow==3.0.0
requests==2.8.1
uWSGI==2.0.17
Flask==1.0.2
Pillow==5.1.0
requests==2.18.4
gunicorn==19.8.1
Werkzeug==0.14.1
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment