feat: added docker entrypoint

pull/208/head
NGPixel 7 years ago
parent acc5b4b7e0
commit 8f8ee6ad77

@ -0,0 +1,4 @@
#!/bin/ash
apk add bash curl git openssh
cd /var/www
node server

@ -23,45 +23,18 @@ build:
- script: - script:
name: copy artifacts name: copy artifacts
code: | code: |
ls cp -LR assets node_modules server config.sample.yml package.json wiki.cmd wiki.js "$WERCKER_OUTPUT_DIR/var/wiki"
cp -LR assets node_modules server config.sample.yml package.json wiki.cmd wiki.js "$WERCKER_OUTPUT_DIR" cp .build/docker_init.sh "$WERCKER_OUTPUT_DIR/init.sh"
deploy-github:
box: node:8
steps:
- script:
name: package
code: |
tar -chzfv wiki-js.tar.gz * -X .build/.deployexclude
tar -chzfv node_modules.tar.gz node_modules
SEMVER_LAST=`npm show wiki.js version`
chmod +x ./.build/semver_next.sh
SEMVER_NEXT=`./.build/semver_next.sh -p $SEMVER_LAST`
- github-create-release:
token: $GITHUB_TOKEN
tag: "v${SEMVER_NEXT}"
prerelease: true
- github-upload-asset:
token: $GITHUB_TOKEN
file: wiki-js.tar.gz
- github-upload-asset:
token: $GITHUB_TOKEN
file: node_modules.tar.gz
deploy-docker-master: deploy-docker-master:
box: node:8-alpine box: node:8-alpine
steps: steps:
- script:
name: install dependencies
code: |
apk update
apk add bash curl git openssh
- internal/docker-push: - 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: node server entrypoint: ["ash", "/init.sh"]
repository: requarks/wiki repository: requarks/wiki
registry: https://registry.hub.docker.com registry: https://registry.hub.docker.com
@ -73,6 +46,28 @@ deploy-docker-dev:
password: $DOCKER_HUB_PASSWORD password: $DOCKER_HUB_PASSWORD
tag: dev tag: dev
ports: "3000" ports: "3000"
entrypoint: node server entrypoint: ["ash", "/init.sh"]
repository: requarks/wiki repository: requarks/wiki
registry: https://registry.hub.docker.com registry: https://registry.hub.docker.com
deploy-github:
box: node:8
steps:
- script:
name: package
code: |
tar -chzfv wiki-js.tar.gz * -X .build/.deployexclude
tar -chzfv node_modules.tar.gz node_modules
SEMVER_LAST=`npm show wiki.js version`
chmod +x ./.build/semver_next.sh
SEMVER_NEXT=`./.build/semver_next.sh -p $SEMVER_LAST`
- github-create-release:
token: $GITHUB_TOKEN
tag: "v${SEMVER_NEXT}"
prerelease: true
- github-upload-asset:
token: $GITHUB_TOKEN
file: wiki-js.tar.gz
- github-upload-asset:
token: $GITHUB_TOKEN
file: node_modules.tar.gz

Loading…
Cancel
Save