Skip to content

Instantly share code, notes, and snippets.

@phpdude
Created October 10, 2016 17:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phpdude/bd3767642008de6d91e3e1f5dba3d7d4 to your computer and use it in GitHub Desktop.
Save phpdude/bd3767642008de6d91e3e1f5dba3d7d4 to your computer and use it in GitHub Desktop.
Dockerfile test
FROM debian:stable
ENV PYTHONUNBUFFERED 1
RUN apt-get update && apt-get install -y curl
RUN curl -sL https://deb.nodesource.com/setup_5.x | bash -
RUN apt-get install -y nodejs nginx-extras python-pip uwsgi-plugin-python git libpq-dev python-dev libxml2-dev libxslt1-dev vim graphviz
RUN apt-get install -y libjpeg-dev
RUN mkdir /app/
WORKDIR /app/
ADD libs libs
ADD project/requirements.txt /app/requirements.txt
ADD project/assets/package.json /app/project/assets/package.json
RUN pip install -U -r /app/requirements.txt
RUN cd /app/project/assets/ && npm install
RUN mkdir /app/logs /app/tmp/
ADD . /app/
ENV DOCKER 1
RUN cd /app/project/assets/ && npm run build
RUN python manage.py collectstatic --noinput -v0
ADD docker/production/nginx/nginx.conf /etc/nginx/sites-enabled/project
ADD docker/production/nginx/conf.d/* /etc/nginx/conf.d/
EXPOSE 80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment