refactor: Dockerfile for VSTS
This commit is contained in:
parent
33d961cc3f
commit
c2db365922
3
.gitignore
vendored
3
.gitignore
vendored
@ -35,3 +35,6 @@ config.yml
|
|||||||
# IDE exclude
|
# IDE exclude
|
||||||
.idea
|
.idea
|
||||||
*.sublime-*
|
*.sublime-*
|
||||||
|
|
||||||
|
# Test results
|
||||||
|
test-results/
|
||||||
|
@ -145,6 +145,7 @@
|
|||||||
"fuse-box": "~2.2.2",
|
"fuse-box": "~2.2.2",
|
||||||
"i18next-xhr-backend": "~1.4.2",
|
"i18next-xhr-backend": "~1.4.2",
|
||||||
"jest": "~20.0.4",
|
"jest": "~20.0.4",
|
||||||
|
"jest-junit": "~3.1.0",
|
||||||
"jquery": "~3.2.1",
|
"jquery": "~3.2.1",
|
||||||
"jquery-contextmenu": "~2.5.0",
|
"jquery-contextmenu": "~2.5.0",
|
||||||
"jquery-simple-upload": "~1.0.0",
|
"jquery-simple-upload": "~1.0.0",
|
||||||
@ -168,6 +169,7 @@
|
|||||||
"vuex": "~2.4.0"
|
"vuex": "~2.4.0"
|
||||||
},
|
},
|
||||||
"jest": {
|
"jest": {
|
||||||
|
"testResultsProcessor": "./node_modules/jest-junit",
|
||||||
"collectCoverage": false,
|
"collectCoverage": false,
|
||||||
"testMatch": [
|
"testMatch": [
|
||||||
"**/test/**/*.js?(x)",
|
"**/test/**/*.js?(x)",
|
||||||
@ -175,6 +177,12 @@
|
|||||||
],
|
],
|
||||||
"verbose": true
|
"verbose": true
|
||||||
},
|
},
|
||||||
|
"jest-junit": {
|
||||||
|
"suiteName": "jest test",
|
||||||
|
"output": "./test-results/junit.xml",
|
||||||
|
"classNameTemplate": "{classname}-{title}",
|
||||||
|
"titleTemplate": "{classname}-{title}"
|
||||||
|
},
|
||||||
"collective": {
|
"collective": {
|
||||||
"type": "opencollective",
|
"type": "opencollective",
|
||||||
"url": "https://opencollective.com/wikijs",
|
"url": "https://opencollective.com/wikijs",
|
||||||
|
15
tools/build/Dockerfile
Normal file
15
tools/build/Dockerfile
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
FROM node:8-alpine
|
||||||
|
LABEL maintainer="requarks.io"
|
||||||
|
|
||||||
|
RUN apk update && \
|
||||||
|
apk add bash curl git openssh supervisor --no-cache && \
|
||||||
|
mkdir -p /var/wiki
|
||||||
|
|
||||||
|
WORKDIR /var/wiki
|
||||||
|
|
||||||
|
COPY supervisord.conf /etc/supervisord.conf
|
||||||
|
COPY . /var/wiki
|
||||||
|
|
||||||
|
EXPOSE 3000
|
||||||
|
|
||||||
|
CMD ["supervisord", "--nodaemon", "-c", "/etc/supervisord.conf"]
|
23
tools/build/supervisord.conf
Normal file
23
tools/build/supervisord.conf
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
[unix_http_server]
|
||||||
|
file=/var/run/supervisor.sock
|
||||||
|
chmod=0700
|
||||||
|
|
||||||
|
[supervisord]
|
||||||
|
logfile=/logs/supervisord.log
|
||||||
|
pidfile=/var/run/supervisord.pid
|
||||||
|
childlogdir=/logs
|
||||||
|
|
||||||
|
[rpcinterface:supervisor]
|
||||||
|
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
|
||||||
|
|
||||||
|
[supervisorctl]
|
||||||
|
serverurl=unix:///var/run/supervisor.sock
|
||||||
|
|
||||||
|
[program:wikijs]
|
||||||
|
command = node server
|
||||||
|
autostart=true
|
||||||
|
autorestart=true
|
||||||
|
priority=5
|
||||||
|
directory=/var/wiki
|
||||||
|
stdout_logfile=/logs/wiki-stdout.log
|
||||||
|
stderr_logfile=/logs/wiki-stderr.log
|
@ -1,52 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Increment a version string using Semantic Versioning (SemVer) terminology.
|
|
||||||
|
|
||||||
# Parse command line options.
|
|
||||||
|
|
||||||
while getopts ":Mmp" Option
|
|
||||||
do
|
|
||||||
case $Option in
|
|
||||||
M ) major=true;;
|
|
||||||
m ) minor=true;;
|
|
||||||
p ) patch=true;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
shift $(($OPTIND - 1))
|
|
||||||
|
|
||||||
version=$1
|
|
||||||
|
|
||||||
# Build array from version string.
|
|
||||||
|
|
||||||
a=( ${version//./ } )
|
|
||||||
|
|
||||||
# If version string is missing or has the wrong number of members, show usage message.
|
|
||||||
|
|
||||||
if [ ${#a[@]} -ne 3 ]
|
|
||||||
then
|
|
||||||
echo "usage: $(basename $0) [-Mmp] major.minor.patch"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Increment version numbers as requested.
|
|
||||||
|
|
||||||
if [ ! -z $major ]
|
|
||||||
then
|
|
||||||
((a[0]++))
|
|
||||||
a[1]=0
|
|
||||||
a[2]=0
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -z $minor ]
|
|
||||||
then
|
|
||||||
((a[1]++))
|
|
||||||
a[2]=0
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -z $patch ]
|
|
||||||
then
|
|
||||||
((a[2]++))
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "${a[0]}.${a[1]}.${a[2]}"
|
|
12
yarn.lock
12
yarn.lock
@ -3753,6 +3753,14 @@ jest-jasmine2@^20.0.4:
|
|||||||
once "^1.4.0"
|
once "^1.4.0"
|
||||||
p-map "^1.1.1"
|
p-map "^1.1.1"
|
||||||
|
|
||||||
|
jest-junit@~3.1.0:
|
||||||
|
version "3.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/jest-junit/-/jest-junit-3.1.0.tgz#3bd0b7a8bfd5b91f86376d44ff0f4c7f136f4287"
|
||||||
|
dependencies:
|
||||||
|
mkdirp "^0.5.1"
|
||||||
|
strip-ansi "^4.0.0"
|
||||||
|
xml "^1.0.1"
|
||||||
|
|
||||||
jest-matcher-utils@^20.0.3:
|
jest-matcher-utils@^20.0.3:
|
||||||
version "20.0.3"
|
version "20.0.3"
|
||||||
resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-20.0.3.tgz#b3a6b8e37ca577803b0832a98b164f44b7815612"
|
resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-20.0.3.tgz#b3a6b8e37ca577803b0832a98b164f44b7815612"
|
||||||
@ -7516,6 +7524,10 @@ xml2js@^0.4.5:
|
|||||||
sax ">=0.6.0"
|
sax ">=0.6.0"
|
||||||
xmlbuilder "^4.1.0"
|
xmlbuilder "^4.1.0"
|
||||||
|
|
||||||
|
xml@^1.0.1:
|
||||||
|
version "1.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/xml/-/xml-1.0.1.tgz#78ba72020029c5bc87b8a81a3cfcd74b4a2fc1e5"
|
||||||
|
|
||||||
xmlbuilder@^4.1.0:
|
xmlbuilder@^4.1.0:
|
||||||
version "4.2.1"
|
version "4.2.1"
|
||||||
resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-4.2.1.tgz#aa58a3041a066f90eaa16c2f5389ff19f3f461a5"
|
resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-4.2.1.tgz#aa58a3041a066f90eaa16c2f5389ff19f3f461a5"
|
||||||
|
Loading…
Reference in New Issue
Block a user