@Manuel187
software
Nothing here yet.
Nothing here yet.
No blogs yet.
Simen Daehlin My dockerfile looks exactly like yours. But mounting /opt/app/src should not affect the node_modules. When I start strapi without the mounted volume I have the folders admin, api and extensions and the index.js file under the folder /opt/app/src. So exactly as I would expect. When I insert the line with the mount in my docker-compose, it seems that the api folder is missing. Any idea how you fixed it?
Hi first off all thank you for this tutorial. I guess i'm missing one last step. I did everything exactly as described in the tutorial except that i don't have an build . in the docker compose but i push an image into my own container registry before it and then use that image. So this is my docker-compose file: version: '3' services: strapi: container_name: strapi image: ghcr.io/confidato/strapi-cms:latest restart: unless-stopped env_file: .env environment: DATABASE_CLIENT: ${DATABASE_CLIENT} DATABASE_HOST: postgresDB DATABASE_NAME: ${DATABASE_NAME} DATABASE_USERNAME: ${DATABASE_USERNAME} DATABASE_PORT: ${DATABASE_PORT} JWT_SECRET: ${JWT_SECRET} DATABASE_PASSWORD: ${DATABASE_PASSWORD} NODE_ENV: ${NODE_ENV} links: - postgresDB:postgresDB volumes: - ./public:/public/upload #- ./src:/opt/app/src ### If this line is not in the file it starts. ports: - "1337:1337" depends_on: - postgresDB postgresDB: image: postgres:12.0-alpine container_name: postgresDB restart: unless-stopped env_file: .env environment: POSTGRES_USER: ${DATABASE_USERNAME} POSTGRES_PASSWORD: ${DATABASE_PASSWORD} POSTGRES_DB: ${DATABASE_NAME} volumes: - ./data:/var/lib/postgresql/data/ ports: - "5432:5432" networks: default: external: name: network123 If i start it without the line - ./src:/opt/app/src in volumes everthing looks good but if i use docker-compose down my data won't show up again in the admin-dashboard. I guess i have a problem with my volume mapping. If I add the line - ./src:/opt/app/src strapi has an error at startup and it says: Missing api folder. Please create one at './src/api'. Any idea where my problem is?