Created
June 2, 2015 05:09
-
-
Save dvl/b7d2c6d6dc4b8714f258 to your computer and use it in GitHub Desktop.
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
postgres: | |
image: postgres | |
ports: | |
- 5432:5432 | |
redis: | |
image: redis | |
ports: | |
- 6379:6379 | |
rabbitmq: | |
image: rabbitmq | |
ports: | |
- 15672:15672 | |
nginx: | |
image: nginx | |
ports: | |
- 80:80 | |
- 443:443 | |
links: | |
- web | |
web: | |
build: . | |
command: python manage.py runserver 0.0.0.0:8000 | |
ports: | |
- 8000:8000 | |
volumes: | |
- .:/usr/src/app | |
links: | |
- postgres | |
- redis | |
- rabbitmq | |
worker: | |
build: . | |
command: celery -A djdocker -l info worker | |
volumes: | |
- .:/usr/src/app | |
links: | |
- postgres | |
- redis | |
- rabbitmq | |
scheduler: | |
build: . | |
command: celery -A djdocker -l info worker | |
volumes: | |
- .:/usr/src/app | |
links: | |
- postgres | |
- redis | |
- rabbitmq |
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 buildpack-deps:jessie | |
RUN apt-get purge -y python.* | |
ENV LANG C.UTF-8 | |
RUN gpg --keyserver ha.pool.sks-keyservers.net --recv-keys \ | |
26DEA9D4613391EF3E25C9FF0A5B101836580288 | |
RUN gpg --keyserver pool.sks-keyservers.net --recv-keys \ | |
9554F04D7259F04124DE6B476D5A82AC7E37093B \ | |
DD8F2338BAE7501E3DD5AC78C273792F7D83545D \ | |
FD3A5288F042B6850C66B31F09FE44734EB7990E | |
ENV PYTHON_VERSION 3.3.6 | |
ENV PYTHON_PIP_VERSION 7.0.1 | |
ENV IOJS_VERSION 2.2.1 | |
ENV NPM_CONFIG_LOGLEVEL info | |
RUN set -x \ | |
&& mkdir -p /usr/src/python \ | |
&& curl -SL "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz" -o python.tar.xz \ | |
&& curl -SL "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz.asc" -o python.tar.xz.asc \ | |
&& gpg --verify python.tar.xz.asc \ | |
&& tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \ | |
&& rm python.tar.xz* \ | |
&& cd /usr/src/python \ | |
&& ./configure --enable-shared --enable-unicode=ucs4 \ | |
&& make -j$(nproc) \ | |
&& make install \ | |
&& ldconfig \ | |
&& curl -SL 'https://bootstrap.pypa.io/get-pip.py' | python3 \ | |
&& pip install --upgrade pip==$PYTHON_PIP_VERSION \ | |
&& find /usr/local \ | |
\( -type d -a -name test -o -name tests \) \ | |
-o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ | |
-exec rm -rf '{}' + \ | |
&& rm -rf /usr/src/python \ | |
&& cd /usr/local/bin \ | |
&& ln -s python3 python \ | |
&& curl -SLO "https://iojs.org/dist/v$IOJS_VERSION/iojs-v$IOJS_VERSION-linux-x64.tar.gz" \ | |
&& curl -SLO "https://iojs.org/dist/v$IOJS_VERSION/SHASUMS256.txt.asc" \ | |
&& gpg --verify SHASUMS256.txt.asc \ | |
&& grep " iojs-v$IOJS_VERSION-linux-x64.tar.gz\$" SHASUMS256.txt.asc | sha256sum -c - \ | |
&& tar -xzf "iojs-v$IOJS_VERSION-linux-x64.tar.gz" -C /usr/local --strip-components=1 \ | |
&& rm "iojs-v$IOJS_VERSION-linux-x64.tar.gz" SHASUMS256.txt.asc | |
RUN apt-get update && apt-get install -y \ | |
postgresql-client libpq-dev \ | |
gcc \ | |
libffi-dev \ | |
--no-install-recommends && rm -rf /var/lib/apt/lists/* | |
RUN mkdir -p /usr/src/app | |
WORKDIR /usr/src/app | |
COPY requirements.txt /usr/src/app/ | |
RUN pip install -r requirements.txt | |
COPY package.json /usr/src/app/ | |
RUN npm install | |
COPY bower.json /usr/src/app/ | |
RUN bower install | |
COPY . /usr/src/app/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment