---
title: "Manuel (@Manuel187) | Hashnode"
description: "software. Read the latest articles by Manuel on Hashnode."
url: "https://hashnode.com/@Manuel187"
---

@Manuel187

# Manuel

@Manuel187 · Joined February 2022

software

## Comments

[Manuel Ok do I don't know if this solution is the right way but I got it working. So for all those who have a similar problem. I have added the following line to my Strapi service: strapi: ... volumes: - strapi:/opt/app/src And created an additional volume in my docker-compose: volumes: strapi:](https://hashnode.com/posts/docker-with-strapi-v4/61dcb820cda0d0294b69c3cd/comment/6203dfc69e350308247fb860#reply-620507e79e350308247fd268)

Reply · Article · Feb 10, 2022 · [🐳 Docker with Strapi V4 🌟](https://hashnode.com/posts/docker-with-strapi-v4/61dcb820cda0d0294b69c3cd)

[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?](https://hashnode.com/posts/docker-with-strapi-v4/61dcb820cda0d0294b69c3cd/comment/6203dfc69e350308247fb860#reply-6204f1e09e350308247fcf7d)

Reply · Article · Feb 10, 2022 · [🐳 Docker with Strapi V4 🌟](https://hashnode.com/posts/docker-with-strapi-v4/61dcb820cda0d0294b69c3cd)

[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?](https://hashnode.com/posts/docker-with-strapi-v4/61dcb820cda0d0294b69c3cd/comment/6203dfc69e350308247fb860)

Comment · Article · Feb 9, 2022 · [🐳 Docker with Strapi V4 🌟](https://hashnode.com/posts/docker-with-strapi-v4/61dcb820cda0d0294b69c3cd)
