Created
January 25, 2018 22:29
-
-
Save dfcarpenter/0fe21a65f0bbb783c4c4db0ceb9ba69f to your computer and use it in GitHub Desktop.
wagtail multistage build dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM python:3.6 | |
COPY requirements.txt . | |
COPY package.json . | |
WORKDIR /app/ | |
ADD . /app/ | |
RUN set -ex \ | |
&& apt-get update \ | |
&& apt-get install apt-transport-https \ | |
&& echo "deb https://deb.nodesource.com/node_8.x jessie main" > /etc/apt/sources.list.d/nodesource.list \ | |
&& wget -qO- https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - \ | |
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \ | |
&& wget -qO- https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ | |
&& apt-get update \ | |
&& apt-get install --no-install-recommends -y \ | |
libpq-dev libjpeg-dev zlib1g-dev libpng12-dev libmagickwand-dev \ | |
python3-dev nodejs yarn libjpeg-progs optipng postgresql-client \ | |
&& rm -rf /var/lib/apt/lists/* | |
RUN pip install -U pip | |
RUN pip install -r /requirements.txt | |
#COPY config/nginx-app.conf /etc/nginx/sites-available/default | |
#COPY config/supervisor-app.conf /etc/supervisor/conf.d/ | |
#RUN npm install webpack -g | |
#RUN npm install | |
#RUN bash -l -c 'npm run prod' | |
# && python3 -m venv venv \ | |
# && /venv/bin/pip install -U pip \ | |
# && /venv/bin/pip install --no-cache-dir -r /requirements.txt | |
#FROM python:3.6-slim | |
#COPY --from=python-base /root/.cache /root/.cache | |
#COPY --from=python-base requirements.txt . | |
# | |
#RUN pip install -r requirements.txt && rm -rf /root/.cache | |
#COPY --from=python-base /app /app | |
COPY /entrypoint.sh /entrypoint.sh | |
RUN sed -i 's/\r//' /entrypoint.sh | |
RUN chmod +x /entrypoint.sh | |
ENV DJANGO_SETTINGS_MODULE=config.settings.deploy | |
EXPOSE 8000 | |
ENTRYPOINT ["/entrypoint.sh"] | |
CMD ["uwsgi", "global_iot_pp.ini", "--http-auto-chunked", "--http-keepalive"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment