You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

22 lines
766 B

FROM node:9.11.1-alpine as front
RUN apk update && apk add python alpine-sdk --no-cache
WORKDIR /web/
ADD ./web/yarn.lock /web/
ADD ./web/package.json /web/
RUN yarn install
ADD ./web/ /web/
RUN yarn build
FROM python:3.6
ENV PYTHONUNBUFFERED 1
RUN apt-get update && apt-get install -y nginx supervisor
RUN pip3 install --no-cache-dir --upgrade pip uwsgi==2.0.17
WORKDIR /app/
ADD requirements.txt /app/
RUN pip install --no-cache-dir -r requirements.txt
ADD . /app/
COPY --from=front /web/build/ /app/web/build/
RUN python manage.py collectstatic --no-input
RUN rm -rf /etc/nginx/ && cp -r docker/conf/nginx /etc/ && cp -r docker/conf/supervisor/* /etc/supervisor/conf.d/ && chown -R www-data:www-data /app/
EXPOSE 80
ENTRYPOINT ["/app/docker/entrypoint_app.sh"]