|
|
@ -20,34 +20,40 @@ build: |
|
|
|
name: purge dev files |
|
|
|
code: | |
|
|
|
yarn install --production --ignore-scripts --prefer-offline |
|
|
|
- script: |
|
|
|
name: copy artifacts |
|
|
|
code: | |
|
|
|
mkdir -p "$WERCKER_OUTPUT_DIR/var/wiki" |
|
|
|
cp -LR assets node_modules server config.sample.yml package.json wiki.cmd wiki.js "$WERCKER_OUTPUT_DIR/var/wiki" |
|
|
|
cp .build/docker_init.sh "$WERCKER_OUTPUT_DIR/init.sh" |
|
|
|
|
|
|
|
deploy-docker-master: |
|
|
|
box: node:8-alpine |
|
|
|
steps: |
|
|
|
- internal/docker-scratch-push: |
|
|
|
- script: |
|
|
|
name: install dependencies |
|
|
|
code: | |
|
|
|
apk update |
|
|
|
apk add bash curl git openssh |
|
|
|
- script: |
|
|
|
name: copy app files |
|
|
|
code: | |
|
|
|
mkdir -p /var/wiki |
|
|
|
cp -LR assets node_modules server config.sample.yml package.json /var/wiki |
|
|
|
yarn cache clean |
|
|
|
- internal/docker-push: |
|
|
|
username: $DOCKER_HUB_USERNAME |
|
|
|
password: $DOCKER_HUB_PASSWORD |
|
|
|
tag: latest, master |
|
|
|
ports: "3000" |
|
|
|
entrypoint: ["ash", "/init.sh"] |
|
|
|
working-dir: /var/wiki |
|
|
|
entrypoint: node server |
|
|
|
repository: requarks/wiki |
|
|
|
registry: https://registry.hub.docker.com |
|
|
|
|
|
|
|
deploy-docker-dev: |
|
|
|
box: node:8-alpine |
|
|
|
steps: |
|
|
|
- internal/docker-scratch-push: |
|
|
|
- internal/docker-push: |
|
|
|
username: $DOCKER_HUB_USERNAME |
|
|
|
password: $DOCKER_HUB_PASSWORD |
|
|
|
tag: dev |
|
|
|
ports: "3000" |
|
|
|
entrypoint: ["ash", "/init.sh"] |
|
|
|
entrypoint: node server |
|
|
|
repository: requarks/wiki |
|
|
|
registry: https://registry.hub.docker.com |
|
|
|
|
|
|
|