Closed sebqq closed 3 years ago
Hi,
Can you verify your package.json or pacakge-lock.json is not pointing to an older version of the strapi-admin package ?
It looks like it is pointing to 3.3.2. I've also tried to remove package-lock.json and node_modules.
Hey, I don't see anything wrong and I can't reproduce... are you using a volum with docker-compose or just docker run this image ?
I'm using combination of following two docker-compose files:
version: "3"
# docker-compose.yml
services:
backend:
container_name: container-strapi
restart: unless-stopped
networks:
- strapi-app-network
volumes:
- .:/usr/app
- /usr/app/node_modules
depends_on:
- db
ports:
- 1337:1337
expose:
- 1337
db:
image: mongo
container_name: container-mongo
networks:
- strapi-app-network
ports:
- 27017:27017
networks:
strapi-app-network:
driver: bridge
and
version: "3"
# docker-compose.dev.yml
services:
backend:
build:
context: .
dockerfile: Dockerfile
environment:
NODE_ENV: development
DATABASE_CLIENT: mongo
DATABASE_NAME: strapi
DATABASE_HOST: db
DATABASE_PORT: 27017
DATABASE_USERNAME: test
DATABASE_PASSWORD: test
db:
environment:
MONGO_INITDB_DATABASE: strapi
MONGO_INITDB_ROOT_USERNAME: test
MONGO_INITDB_ROOT_PASSWORD: test
volumes:
- ./.test-db:/data/db
Can there be any problem with node_modules
volume?
Also, this picture is interesting
Hi, your 1st config will not use the image files but mount them so you will need to run a yarn build on the host. In your second conf it seems to me that it should work fine if you built the image previously :/
The screen shows that the api is in 3.3.3 and the admin in 3.3.2 and you upgraded the front from 3.2.2 to 3.3.2 by the way so you must have fixed something at some point :)
@alexandrebodin I'm actually merging these two files using docker-compose -f docker-compose.yml -f docker-compose.dev.yml up
command. Shouldn't it combine these two yml configs into one?
The screen shows that the api is in 3.3.3 and the admin in 3.3.2 and you upgraded the front from 3.2.2 to 3.3.2 by the way so you must have fixed something at some point :)
Yep, I've moved from my local machine to VPS and there was another strapi release in the meantime 😄
I actually never used two docker compose config together :) Good to know !
So if it is actually used as one config then the volume mount overrides the build in the docker image and you still need to build the admin. I would suggest not to mount a volume if you already copy the files in the image.
@alexandrebodin That seems to work 😺 thank you so much!
So I've just upgraded my strapi application inside of docker container and my console shows right version number:
But the problem is that admin dashboard still shows older strapi version:
During update I followed steps from migration guide and used
npm run build -- --clean
command to rebuild admin panel. My Dockerfile looks like:Also my console during build process displayed following message so I think that --clean build was succesfully completed:
Does anyone know what could cause the problem?
Thanks!