A Dockerized Flask backend for the Weather App
185
A simple weather app built with Flask and served via Nginx using Docker Compose. Enter a city name and get real-time weather data fetched from the OpenWeatherMap API.
weather-app/
โ
โโโ app/
โ โโโ app.py # Flask app
โ โโโ requirements.txt # Python dependencies
โ
โโโ frontend/
โ โโโ index.html # Simple HTML frontend
โ
โโโ nginx/
โ โโโ default.conf # Nginx reverse proxy config
โ
โโโ Dockerfile # Flask Docker image
โโโ docker-compose.yml # Docker Compose setup
โโโ README.md # Project documentation
Make sure you have:
git clone https://github.com/yourusername/weather-app.git
cd weather-app
Create a .env file in the project root:
API_KEY=your_openweathermap_api_key_here
docker-compose up --build
Access the app at: http://localhostโ
Mumbai or New York in the input box.| Tool | Purpose |
|---|---|
| Flask | Python Web Framework |
| OpenWeatherMap | Weather API Provider |
| Nginx | Reverse Proxy |
| Docker | Containerization |
| Docker Compose | Multi-container setup |
| HTML/CSS | Frontend UI |
To stop and remove containers:
docker-compose down
Content type
Image
Digest
sha256:096777f82โฆ
Size
50.5 MB
Last updated
about 1 year ago
docker pull ritesh355/weather-app-backend