refactor: use npm script for serve in docker

This commit is contained in:
Jovan Krunić
2021-04-07 18:25:23 +02:00
parent 4e367254c2
commit 3fc7c781ec
3 changed files with 308 additions and 326 deletions

View File

@@ -100,9 +100,9 @@ ADD . /app
COPY $SCRIPTS_DIRECTORY/$NODE_SETUP_SCRIPT /tmp/
RUN bash /tmp/$NODE_SETUP_SCRIPT && apt-get install -y nodejs && \
### Update npm to latest version
### Install wanted npm version
npm install -g npm@$NPM_VERSION && \
### Install needed npm packages
### Install needed global npm packages
npm install -g @ionic/cli@$IONIC_VERSION cordova@$CORDOVA_VERSION cordova-res@$CORDOVA_RES_VERSION
### Create, build, delete an empty cordova project to download necessary maven files and keep them in image

628
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -22,7 +22,7 @@
"docker:build": "sudo docker run -p 8100:8100 -p 35729:35729 -p 53703:53703 -v $PWD:/app -it registry.gitlab.com/openstapps/app bash -c \"npm install && npm run build\"",
"docker:enter": "sudo docker run -p 8100:8100 -p 35729:35729 -p 53703:53703 -v $PWD:/app -it registry.gitlab.com/openstapps/app bash",
"docker:fresh": "sudo docker pull registry.gitlab.com/openstapps/app",
"docker:serve": "sudo docker run -p 8100:8100 -p 35729:35729 -p 53703:53703 -v $PWD:/app -it registry.gitlab.com/openstapps/app bash -c \"ionic serve\"",
"docker:serve": "sudo docker run -p 8100:8100 -p 35729:35729 -p 53703:53703 -v $PWD:/app -it registry.gitlab.com/openstapps/app bash -c \"npm start\"",
"documentation": "compodoc -p tsconfig.json -d docs",
"lint": "ng lint",
"ng": "ng",