Unverified 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 \ ...@@ -11,10 +11,11 @@ RUN apk add --no-cache nodejs \
&& rm -rf node_modules \ && rm -rf node_modules \
&& apk del nodejs && 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 \ && pip install -r /app/requirements.txt \
&& apk del build-dep && apk del build-dep
EXPOSE 80 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; worker_processes 4;
pid /run/nginx.pid; pid /run/nginx.pid;
daemon off; daemon off;
...@@ -33,26 +33,16 @@ http { ...@@ -33,26 +33,16 @@ http {
} }
location /static { location /static {
root /tedimg; root /app/tedimg;
} }
location / { location / {
uwsgi_pass unix:///app.sock; proxy_pass http://127.0.0.1:8000/;
uwsgi_param QUERY_STRING $query_string;
uwsgi_param REQUEST_METHOD $request_method; proxy_set_header Host $http_host;
uwsgi_param CONTENT_TYPE $content_type; proxy_set_header X-Real-IP $remote_addr;
uwsgi_param CONTENT_LENGTH $content_length; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
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;
} }
} }
} }
...@@ -8,5 +8,6 @@ command=nginx -c /app/docker/nginx.conf ...@@ -8,5 +8,6 @@ command=nginx -c /app/docker/nginx.conf
redirect_stderr=true redirect_stderr=true
[program:flask] [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 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 Flask==1.0.2
itsdangerous==0.24 Pillow==5.1.0
Jinja2==2.8 requests==2.18.4
MarkupSafe==1.0 gunicorn==19.8.1
Pillow==3.0.0
requests==2.8.1
uWSGI==2.0.17
Werkzeug==0.14.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