Created
January 9, 2020 17:36
-
-
Save evildmp/f0b012f1331615c5f4df60a2883051bf to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# <WARNING> | |
# Everything within sections like <TAG> is generated and can | |
# be automatically replaced on deployment. You can disable | |
# this functionality by simply removing the wrapping tags. | |
# </WARNING> | |
# <DOCKER_FROM> | |
# FROM aldryn/base-project:3.25.1 | |
FROM divio/base:4.15-py3.6-slim-stretch | |
# </DOCKER_FROM> | |
# <NODE> | |
ADD tools/build /stack/boilerplate | |
RUN apt-get update && \ | |
apt-get install -y git | |
ENV NODE_VERSION=6.10.1 \ | |
NPM_VERSION=3.10.10 | |
RUN bash /stack/boilerplate/install.sh | |
ENV NODE_PATH=$NVM_DIR/versions/node/v$NODE_VERSION/lib/node_modules \ | |
PATH=$NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH | |
# </NODE> | |
# <BOWER> | |
# </BOWER> | |
# <PYTHON> | |
ENV PIP_INDEX_URL=${PIP_INDEX_URL:-https://wheels.aldryn.net/v1/aldryn-extras+pypi/${WHEELS_PLATFORM:-aldryn-baseproject}/+simple/} \ | |
WHEELSPROXY_URL=${WHEELSPROXY_URL:-https://wheels.aldryn.net/v1/aldryn-extras+pypi/${WHEELS_PLATFORM:-aldryn-baseproject}/} | |
COPY requirements.* /app/ | |
COPY addons-dev /app/addons-dev/ | |
RUN pip-reqs compile && \ | |
pip-reqs resolve && \ | |
pip install \ | |
--no-index --no-deps \ | |
--requirement requirements.urls | |
# </PYTHON> | |
# <NPM> | |
# package.json is put into / so that mounting /app for local | |
# development does not require re-running npm install | |
ENV PATH=/node_modules/.bin:$PATH | |
COPY package.json / | |
COPY package-lock.json / | |
RUN (cd / && npm install --production && rm -rf /tmp/*) | |
# </NPM> | |
# <SOURCE> | |
COPY . /app | |
# </SOURCE> | |
# <GULP> | |
ENV GULP_MODE=production | |
RUN gulp build | |
# </GULP> | |
# <STATIC> | |
RUN DJANGO_MODE=build python manage.py collectstatic --noinput | |
# </STATIC> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment