diff --git a/Dockerfile b/Dockerfile index a5d4f08804a858bd0adbab896a825ea2842d4694..af297f67bc3ab2c6bfea7267b9eecc736b0e93b9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,7 @@ FROM xpub/xpub:base +WORKDIR ${HOME} + COPY package.json yarn.lock ./ COPY lerna.json .babelrc .eslintignore .eslintrc .prettierrc .stylelintignore .stylelintrc ./ COPY packages packages @@ -16,7 +18,9 @@ RUN [ "rm", "-rf", "/npm-packages-offline-cache"] ENV NODE_ENV "development" -# WORKDIR ${HOME}/packages/xpub-faraday +WORKDIR ${HOME}/packages/xpub-faraday # RUN [ "npm", "run", "server "] EXPOSE 3000 + +CMD [ "npm", "run", "start-now" ] \ No newline at end of file diff --git a/package.json b/package.json index 079e1d213d174a5d15d3b0943eded9c29c5e2881..6ce1449622553b2a8bcaf49f2f5a32273a066d33 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,8 @@ "lint:style": "stylelint packages/**/*.scss packages/**/*.css", "precommit": "lint-staged", "styleguide": "lerna run styleguide", - "test": "lerna run test" + "test": "lerna run test", + "start": "docker-compose up" }, "lint-staged": { "*.js": [ diff --git a/packages/xpub-faraday/package.json b/packages/xpub-faraday/package.json index 177fd1eb708fc8cc9d7dde29c095fcb5a872061e..6f7e0fb9f40fb5c888656c0c7a21c27eec2d89e8 100644 --- a/packages/xpub-faraday/package.json +++ b/packages/xpub-faraday/package.json @@ -76,8 +76,7 @@ "start": "pubsweet start", "start:services": "docker-compose up postgres", "server": "pubsweet server", - "setupdb-now": "pubsweet setupdb --username admin --email admin@mailinator.com --password admin123 --clobber ./", - "start-now": "echo $secret > config/local-development.json && npm run setupdb-now && npm run start", + "start-now": "echo $secret > config/local-development.json && npm run server", "build": "NODE_ENV=production pubsweet build", "clean": "rm -rf node_modules" }