Commit 7e22e821 authored by kaiyou's avatar kaiyou
Browse files

Build from alpine and process assets during the build

parent 974d16e4
FROM python:3 FROM python:3-alpine
RUN apt-get update \ RUN apk add --no-cache nginx supervisor
&& apt-get install --no-install-recommends -y nginx supervisor \
&& apt-get clean
ADD requirements.txt /requirements.txt ADD . /app
RUN pip install -r /requirements.txt WORKDIR /app
ADD tedimg /tedimg RUN apk add --no-cache nodejs \
ADD docker /config && npm install \
&& npm run build \
&& rm -rf node_modules \
&& apk del nodejs
RUN apk add --no-cache gcc libjpeg-turbo-dev zlib zlib-dev \
&& pip install -r /app/requirements.txt \
&& apk del gcc libjpeg-turbo-dev zlib-dev
...@@ -4,9 +4,9 @@ nodaemon=true ...@@ -4,9 +4,9 @@ nodaemon=true
loglevel=DEBUG loglevel=DEBUG
[program:nginx] [program:nginx]
command=nginx -c /config/nginx.conf command=nginx -c /app/docker/nginx.conf
redirect_stderr=true redirect_stderr=true
[program:flask] [program:flask]
command = /usr/local/bin/uwsgi --ini /config/uwsgi.conf command = /usr/local/bin/uwsgi --ini /app/docker/uwsgi.conf
redirect_stderr=true redirect_stderr=true
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