|
|
@ -20,34 +20,40 @@ build:
|
|
|
|
name: purge dev files
|
|
|
|
name: purge dev files
|
|
|
|
code: |
|
|
|
|
code: |
|
|
|
|
yarn install --production --ignore-scripts --prefer-offline
|
|
|
|
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:
|
|
|
|
deploy-docker-master:
|
|
|
|
box: node:8-alpine
|
|
|
|
box: node:8-alpine
|
|
|
|
steps:
|
|
|
|
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
|
|
|
|
username: $DOCKER_HUB_USERNAME
|
|
|
|
password: $DOCKER_HUB_PASSWORD
|
|
|
|
password: $DOCKER_HUB_PASSWORD
|
|
|
|
tag: latest, master
|
|
|
|
tag: latest, master
|
|
|
|
ports: "3000"
|
|
|
|
ports: "3000"
|
|
|
|
entrypoint: ["ash", "/init.sh"]
|
|
|
|
working-dir: /var/wiki
|
|
|
|
|
|
|
|
entrypoint: node server
|
|
|
|
repository: requarks/wiki
|
|
|
|
repository: requarks/wiki
|
|
|
|
registry: https://registry.hub.docker.com
|
|
|
|
registry: https://registry.hub.docker.com
|
|
|
|
|
|
|
|
|
|
|
|
deploy-docker-dev:
|
|
|
|
deploy-docker-dev:
|
|
|
|
box: node:8-alpine
|
|
|
|
box: node:8-alpine
|
|
|
|
steps:
|
|
|
|
steps:
|
|
|
|
- internal/docker-scratch-push:
|
|
|
|
- internal/docker-push:
|
|
|
|
username: $DOCKER_HUB_USERNAME
|
|
|
|
username: $DOCKER_HUB_USERNAME
|
|
|
|
password: $DOCKER_HUB_PASSWORD
|
|
|
|
password: $DOCKER_HUB_PASSWORD
|
|
|
|
tag: dev
|
|
|
|
tag: dev
|
|
|
|
ports: "3000"
|
|
|
|
ports: "3000"
|
|
|
|
entrypoint: ["ash", "/init.sh"]
|
|
|
|
entrypoint: node server
|
|
|
|
repository: requarks/wiki
|
|
|
|
repository: requarks/wiki
|
|
|
|
registry: https://registry.hub.docker.com
|
|
|
|
registry: https://registry.hub.docker.com
|
|
|
|
|
|
|
|
|
|
|
|