Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
2.0k views
in Technique[技术] by (71.8m points)

vue.js - Docker Compose MEVN not reflecting updates made to package.json

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

[email protected] start /usr/src/app, should read [email protected] ...

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",
     ...
  },

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share

2.1m questions

2.1m answers

63 comments

56.6k users

...