Skip to content

Add Dockerfile production and fix the subsequent commands to install app

Giannis Kopanas requested to merge fix-docker-run-production-enviroment into master

Steps i did to add production inviroment to docker :

  1. Add env-sample file (which should be copied to .env and filled in the with the desired enviroment settings)
  2. That worked but i had also to force --production=false during yarn install at production enviroment, because yarn forces that in NODE_ENV is at production and some packages from devDependency did not installed (clean-webpack-plugin)
  3. Also added a production.js to config

EDIT:

  • do a yarn install with NODE_ENV=development

  • do a build with NODE_ENV=production

  • yarn install with NODE_ENV=production to remove dev deps (from previous install) (Optional)

  • deploy the remaining files

Also created multiple files one common docker compose file and one production and override compose file

Closes #182 (closed)

Edited by Giannis Kopanas

Merge request reports