This project provides a web interface to visualize temperature and humidity data using charts. It features interactive charts for temperature and humidity, and dynamically displays icons based on the current weather conditions and time of day.
- Interactive Charts: Displays temperature and humidity data over time using Chart.js.
- Dynamic Icons: Shows icons representing the current weather (sun/moon) and temperature (hot/cold).
- Responsive Design: Optimized for various screen sizes.
Before running this project, ensure you have the following installed:
Dockerfile
: Defines the Docker image for the project.docker-compose.yml
: Configures the Docker services and networking.app/
: Contains the HTML and JavaScript files for the web interface.index.html
: The main HTML file for the web application.
-
Clone the Repository
git clone https://github.com/0ri0nRo/SmartHouse.git
Use Docker Compose to build and start the container. This command will also start any dependencies defined in the docker-compose.yml
file.
docker-compose up -d --build
# To backup your data in postgres docker
sudo src/backup.sh
This command will:
- Build the Docker image as defined in the Dockerfile.
- Create and start a container based on the built image.
- Expose the application on port 5000.
If you need to restore your PostgreSQL database from a .sql
backup file, follow these steps:
First, ensure the backup file (e.g., backup.sql
) is located in the src
directory. Then, use the following docker cp
command to copy it into the PostgreSQL container:
docker cp ./src/backup.sql <container_id>:/backup.sql
After copying the backup file into the container, you can restore it using the following command:
docker exec -i <container_id> psql -U postgres -d <YOUR_DATABASE> -f /backup.sql