diff --git a/Dockerfile b/Dockerfile index 831b1d8..9abdff7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,11 @@ FROM node:10.15 ENV NODE_ENV production +ENV PORT 80 +ENV EXPOSED_PORT 80 + WORKDIR /root +ENTRYPOINT [ "node", "src/index.js" ] ADD ./ /root RUN yarn --production diff --git a/package.json b/package.json index 7638b1b..095d183 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@base-cms/body-import-parser", - "version": "0.1.0", + "version": "0.1.1", "main": "src/index.js", "repository": "https://github.com/base-cms/body-import-parser.git", "author": "Jacob Bare ", diff --git a/scripts/deploy.js b/scripts/deploy.js index 980eb71..58969e4 100755 --- a/scripts/deploy.js +++ b/scripts/deploy.js @@ -3,19 +3,16 @@ * Deployment tool for project * Requirements: * - ENV - * - DOCKERHUB_USERNAME - * - DOCKERHUB_PASSWORD + * - DOCKER_USERNAME + * - DOCKER_PASSWORD * - TRAVIS_TAG * - RANCHER_URL * - RANCHER_TOKEN * - RANCHER_CLUSTERID */ -const { existsSync } = require('fs'); -const { join } = require('path'); const { spawnSync } = require('child_process'); const https = require('https'); -const lerna = require('../lerna.json'); const { log } = console; const { TRAVIS_TAG: version } = process.env; @@ -77,13 +74,13 @@ const shouldBuild = async () => { */ const build = async () => { log(`Building ${image}:${version}...\n`); - const { status } = await spawnSync('bash', ['scripts/deploy-image.sh', site, version], { stdio: 'inherit' }); + const { status } = await spawnSync('bash', ['scripts/deploy-image.sh', version], { stdio: 'inherit' }); if (status !== 0) error('Image build failed!'); } const deploy = async () => { log(`Deploying ${image}:${version} on Kubernertes`); - const { status } = await spawnSync('bash', ['scripts/deploy-k8s.sh', site, version], { stdio: 'inherit' }); + const { status } = await spawnSync('bash', ['scripts/deploy-k8s.sh', version], { stdio: 'inherit' }); if (status !== 0) error('Image deploy failed!'); };