Last active
November 2, 2016 21:01
-
-
Save ssummer3/0428f2d407324cc43bdf7c68a1629679 to your computer and use it in GitHub Desktop.
Docker Stack: Zucchetto/Vatican
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
networks: {} | |
services: | |
nodeapp: | |
build: | |
args: | |
app: zucchetto | |
context: . | |
volumes: | |
- ./website:/home/app/website:rw | |
web: | |
depends_on: | |
- nodeapp | |
image: nginx | |
ports: | |
- 8080:80 | |
volumes: | |
- ./website:/usr/share/nginx/html:ro | |
version: '2.0' | |
volumes: {} |
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
FROM node:5.5.0 | |
ARG app | |
RUN useradd --user-group --create-home --shell /bin/false app | |
ENV HOME=/home/app | |
WORKDIR ${HOME} | |
RUN git clone --depth 1 https://github.com/ndlib/${app} | |
RUN chown -R app:app ${HOME}/* | |
USER app | |
WORKDIR ${HOME}/${app} | |
RUN npm install && npm cache clean | |
ENTRYPOINT npm run build &&\ | |
cd public &&\ | |
cp -a . ${HOME}/website |
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
#! /bin/bash | |
DEST_DIR=./website/resources/cache_data | |
mkdir -p ${DEST_DIR} | |
BASE_URL=https://honeycomb.library.nd.edu/v1/collections | |
load_file() { | |
curl -sz "${1}" -o "${1}" "${2}" | |
} | |
load_file "${DEST_DIR}/cst_data.json" "${BASE_URL}/vatican/items" & | |
load_file "${DEST_DIR}/ihrl_data.json" "${BASE_URL}/humanrights/items" & | |
for job in $(jobs -p); do | |
wait ${job} | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment