I am trying to deploy my MEVN app using Docker, but I can't seem to make Docker update when I change my package.json
I'm running docker-compose up -d
and have shut it down using docker-compose down
to try to reset the project. I've changed the version on my package.json file to verify, and logging says its running @0.1.0 when it should reflect a change to 0.2.0 so I know for sure its not running the updated changes. I have also used the --force-recreate
flag, which still did not show the new changes either.
docker ps -a
shows that the containers are no longer on my machine as well.
npm logs an error no longer relevant as it reflects an issue with version 0.1.0 of the file that I have since corrected. All help is appreciated!
npm output
bell-magazine@0.1.0 start /usr/src/app
, should read bell-magazine@0.2.0 ...
docker-compose.yml
version: "3"
services:
client:
command: npm run start
container_name: bell-magazine
build: ./client
ports: ["8089:8089"]
environment:
- NODE_ENV=development
server:
command: npm run start
container_name: bell-magazine-api
build: ./server
ports: ["5000:5000"]
environment:
- NODE_ENV=development
Dockerfile
FROM node:11
WORKDIR /usr/src/app
COPY package*.json ./
RUN npm install
EXPOSE 8089
COPY . .
snippets from package.json
"name": "bell-magazine",
"version": "0.2.0",
"private": true,
"scripts": {
"start": "vue-cli-service serve",
...
},
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…