Commit 7e22e821 authored by kaiyou's avatar kaiyou

Build from alpine and process assets during the build

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