From 21684716399a3eb222e14f0ce7c4bd722a284d13 Mon Sep 17 00:00:00 2001 From: Mauro <153268739+MauroCerrato@users.noreply.github.com> Date: Wed, 3 Sep 2025 11:50:11 +0200 Subject: [PATCH] Update README.md Added more details on VS Code Setup --- README.md | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) diff --git a/README.md b/README.md index fbceb28..6941d9b 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,76 @@ # vs-code-dev-env VSCode setup, extensions, debugging, remote development workflows. Used in all other repos as development environment. + +# πŸ› οΈ VS Code Setup Guide for Python + Docker Projects + +This guide helps you configure Visual Studio Code to work with Python-based RESTful applications and Docker containers. + +--- + +## βœ… Prerequisites + +- https://www.python.org/downloads/ +- https://www.docker.com/products/docker-desktop/ +- https://code.visualstudio.com/ + +--- + +## 🧩 Recommended VS Code Extensions + +- **Python** (by Microsoft) +- **Docker** (by Microsoft) +- **REST Client** (by Huachao Mao) +- **Markdown All in One** (optional) + +--- + +## πŸ“ Project Structure + +my-project/ +β”œβ”€β”€ app.py +β”œβ”€β”€ Dockerfile +β”œβ”€β”€ requirements.txt +β”œβ”€β”€ README.md +└── .vscode/ + └── settings.json + +--- + +## βš™οΈ Example `.vscode/settings.json` + +```json +{ + "python.pythonPath": "python3", + "python.formatting.provider": "black", + "editor.formatOnSave": true, + "docker.dockerPath": "/usr/local/bin/docker" +} +________________________________________ +🐳 Dockerfile Example +FROM python:3.10-slim +WORKDIR /app +COPY requirements.txt . +RUN pip install -r requirements.txt +COPY . . +CMD ["python", "app.py"] +________________________________________ +▢️ Run Locally +docker build -t my-app . +docker run -p 8080:8080 my-app +________________________________________ +πŸ§ͺ Test with REST Client +Create a file test.http: +GET http://localhost:8080/health +Click β€œSend Request” in VS Code to test your API. +________________________________________ +πŸ“¦ Publish to DockerHub +docker tag my-app yourusername/my-app +docker push yourusername/my-app +________________________________________ +πŸ“š Resources +β€’ https://code.visualstudio.com/docs/python/python-tutorial +β€’ https://code.visualstudio.com/docs/containers/overview + +--- +