Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker-compose strapi : create app even code exist and double mount #320

Closed
tsv38 opened this issue Nov 4, 2021 · 5 comments
Closed

docker-compose strapi : create app even code exist and double mount #320

tsv38 opened this issue Nov 4, 2021 · 5 comments

Comments

@tsv38
Copy link

tsv38 commented Nov 4, 2021

When i want to run a strapi container with docker-compose and with a folder having already the code, log says that /svr/app is empty and create a new app. And when I check mounts, there are 2 mounts on /svr/app/.
If I create container with docker run -v pwd/strapi:/srv/app strapi/strapi it is ok, the app is just started.
yml file like
volumes:
- ./strapi:/svr/app
mounts in inspect
"Mounts": [
{
"Type": "bind",
"Source": "/mnt/c/Users/tsv/OneDrive/Dev/centrazen/strapi",
"Destination": "/svr/app",
"Mode": "rw",
"RW": true,
"Propagation": "rprivate"
},
{
"Type": "volume",
"Name": "1fc5b8dd03afcdbe9563b7d9bc33bb6d8fd783db5d05fecfd65727d51e2c7ae3",
"Source": "/var/lib/docker/volumes/1fc5b8dd03afcdbe9563b7d9bc33bb6d8fd783db5d05fecfd65727d51e2c7ae3/_data",
"Destination": "/srv/app",
"Driver": "local",
"Mode": "",
"RW": true,
"Propagation": ""
}
],

@ChristianHeimke
Copy link

could you please provide the complete docker-compose.yml file? it is important which image you use (strapi/base or strapi/strapi).

@tsv38
Copy link
Author

tsv38 commented Nov 4, 2021 via email

@ChristianHeimke
Copy link

it looks like a typo in your compose file:

    volumes:
      - ./strapi:/svr/app

it should be:

    volumes:
      - ./strapi:/srv/app

you wrote svr instead of srv - this could be the reason why the boot process is creating a new project. your docker run command docker run -v pwd/strapi:/srv/app strapi/strapi set the correct path on /srv/app.

@tsv38
Copy link
Author

tsv38 commented Nov 5, 2021

That's right. Many thanks. So many time just for a letter inversion. Best regards

@ChristianHeimke
Copy link

@tsv38 could you please close the issue if it's solved?

@tsv38 tsv38 closed this as completed Nov 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants