This repository has been archived by the owner on Jan 6, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #179 from freedomofpress/upgrade-node-to-10.x
Upgrades Node version 6.11.0 -> 10.15.1
- Loading branch information
Showing
8 changed files
with
7,714 additions
and
6 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
ARG NODE_VER=4.8.2-alpine | ||
ARG NODE_VER | ||
FROM node:${NODE_VER} AS node-assets | ||
|
||
# Make npm output less verbose | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# 3.6.5-alpine3.7 - May 11, 2018 | ||
FROM python@sha256:bfac58481666aeb60ff6354e81afe888cc8c7b1effb1039870377fc7fa86ef43 | ||
|
||
RUN apk add --no-cache \ | ||
bash \ | ||
curl \ | ||
gcc \ | ||
git \ | ||
# pillow dep | ||
jpeg-dev \ | ||
libffi-dev \ | ||
musl-dev \ | ||
paxctl \ | ||
postgresql-dev \ | ||
# pillow dep | ||
tiff-dev \ | ||
# pillow dep | ||
zlib-dev | ||
|
||
COPY docker/django-start.sh /usr/local/bin | ||
RUN chmod +x /usr/local/bin/django-start.sh | ||
COPY docker/django-start.sh /usr/local/bin | ||
RUN chmod +x /usr/local/bin/django-start.sh | ||
|
||
ARG USERID | ||
RUN adduser -D -g "" -u "${USERID}" gcorn | ||
|
||
RUN paxctl -cm /usr/local/bin/python | ||
COPY securethenews/requirements.txt /requirements.txt | ||
RUN pip install -r /requirements.txt | ||
|
||
RUN mkdir /django-logs && \ | ||
chown -R gcorn: /django-logs | ||
|
||
EXPOSE 8000 | ||
USER gcorn | ||
CMD django-start.sh |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
ARG NODE_VER | ||
FROM node:${NODE_VER} AS node-assets | ||
|
||
# Make npm output less verbose | ||
ENV NPM_CONFIG_LOGLEVEL warn | ||
|
||
# Oddly, node-sass requires both python and make to build bindings | ||
RUN apk add --no-cache paxctl python make g++ | ||
RUN paxctl -cm /usr/local/bin/node | ||
|
||
# Install gulp globally so it can be used during builds | ||
RUN npm install --global gulp-cli | ||
|
||
COPY ./ /src-files | ||
RUN cd /src-files && ( npm install && gulp build:production ) | ||
# 3.6.5-alpine3.7 - May 11, 2018 | ||
FROM python@sha256:bfac58481666aeb60ff6354e81afe888cc8c7b1effb1039870377fc7fa86ef43 | ||
|
||
RUN apk add --no-cache \ | ||
bash \ | ||
curl \ | ||
gcc \ | ||
git \ | ||
# pillow dep | ||
jpeg-dev \ | ||
libffi-dev \ | ||
musl-dev \ | ||
paxctl \ | ||
postgresql-dev \ | ||
# pillow dep | ||
tiff-dev \ | ||
# pillow dep | ||
zlib-dev | ||
|
||
COPY docker/django-start.sh /usr/local/bin | ||
RUN chmod +x /usr/local/bin/django-start.sh | ||
RUN adduser -D -g "" gcorn | ||
LABEL MAINTAINER="Freedom of the Press Foundation" | ||
LABEL APP="securethenews" | ||
|
||
RUN paxctl -cm /usr/local/bin/python | ||
COPY --from=node-assets /src-files/ /django/ | ||
# Unfortunately the chown flag in COPY is not | ||
# available in my docker system version :( | ||
RUN find /django -path /django/node_modules -prune -o -print -exec chown gcorn: '{}' \; | ||
|
||
WORKDIR /django | ||
RUN pip install -r /django/securethenews/requirements.txt | ||
|
||
# Really not used in production. Needed for mapped named volume | ||
# permission handling https://github.com/docker/compose/issues/3270 | ||
RUN mkdir /django-media /django-static /django-logs && \ | ||
chown -R gcorn: /django-media && \ | ||
chown -R gcorn: /django-static && \ | ||
chown -R gcorn: /django-logs | ||
|
||
RUN mkdir -p /etc/gunicorn && chown -R gcorn: /etc/gunicorn | ||
COPY docker/gunicorn/gunicorn.py /etc/gunicorn/gunicorn.py | ||
|
||
EXPOSE 8000 | ||
USER gcorn | ||
CMD django-start.sh |
Oops, something went wrong.