Trick is to update the path from /your-path to /opt/projectĪnd your docker-compose file should look something like this: version: "3. Then the webstorm is able to detect everything as expected. # This done particularly for enabling debugging in webstorm.ĬOPY. Now this won't be detecting the node_modules for remote debugging or any other integration you need in webstorm.īut if you update the dockerfile to something like this # pull official base image Suppose you were using Dockerfile was something like this # pull official base imageĬOPY. I was facing the same issue while I wanted to integrate remote debugging for a backend node service running inside docker. But they have a default path from which they pick it. The issue with webstorm is they don't allow you to define the path from where you can pick node_modules. Trick is to update the path inside docker container from /your-path to /opt/project. Currently, it does not know where to look for tslint configurations, or node_modules. What I wish to accomplish is to use the features of the IDE while in Docker. to add (+) a Docker-compose run, pointing it to the docker-compose.yml file, it works smoothly as well. When I tried to add the run configuration Run > Edit Configurations. When I run docker-compose up, everything runs smoothly. It would run, give an error that the command was not found. Clicked OK on everything and just ran it.Selected Docker Compose from the radio buttons, clicked the folder icon next to Configuration file(s), and chose the appropriate service from the dropdown Service.Went to Edit Configuration at the top-right of the window next to the debug buttons.I know there's something called path mapping, and I've tried to configure it, but nothing happens it still tells me to install packages. Is there a way I can make it so that WebStorm works properly with this? However, my node_modules folders only exist in the containers. It tells me that the tslint package is not installed, for example, and that I need to run npm install to install the node_modules folder. I want to use Docker and not lose the benefit of using WebStorm as an IDE. 49153 # Websocket port for live reloading. My docker-compose.yml file looks like so: version: "3.7"īackend: # Node-Express backend that acts as an API.įrontend: # Angular frontend to be served to client. This is useful for both Frontend and Backend but if you are a Backend developer you will love this at the very beginning. You can set breakpoints on your code and see all your variable values in a good interface. │ ├── docker # Folder that contains docker-compose.yml file. You can set it up fast and start using it. I have my current project directory looking like so.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |