-
Notifications
You must be signed in to change notification settings - Fork 445
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
Comments
could you please provide the complete |
Hi,
I use strapi/strapi.
attach is yml file.
It seems that there is an anonymous empty host dir mounted to svr/app
and entrypoint run with it, and the request host dir is then mount also
to /svr/app
Thanks
Le 04/11/2021 à 13:28, Christian Heimke a écrit :
could you please provide the complete |docker-compose.yml| file? it is
important which image you use (|strapi/base| or |strapi/strapi|).
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#320 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACYPN2ZHPI75KZGPRTQNAELUKJ35BANCNFSM5HLHV3WA>.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
version: '3.4'
services:
strapi:
image: strapi/strapi
container_name: strapi-dev
volumes:
- ./strapi:/svr/app
depends_on:
- db
environment:
NODE_ENV: development
DATABASE_NAME: strapi
DATABASE_HOST: 0.0.0.0
DATABASE_PORT: 5432
DATABASE_USERNAME: postgres
DATABASE_PASSWORD: admin
expose:
- 1337
ports:
- 1337:1337
networks:
- backendNet
db:
image: postgres:9.6.23
container_name: db-dev
environment:
POSTGRES_PASSWORD: admin
expose:
- 5432
ports:
- 5432:5432
networks:
- backendNet
volumes:
- db_data:/var/lib/postgresql/data
networks:
backendNet:
volumes:
db_data:
|
it looks like a typo in your compose file:
it should be:
you wrote |
That's right. Many thanks. So many time just for a letter inversion. Best regards |
@tsv38 could you please close the issue if it's solved? |
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": ""
}
],
The text was updated successfully, but these errors were encountered: