# Deployment Guide for Japan News Collector This guide explains how to deploy the application using Docker on your home server or any machine with Docker installed. ## Prerequisites - [Docker](https://docs.docker.com/get-docker/) installed. - [Docker Compose](https://docs.docker.com/compose/install/) installed (usually included with Docker Desktop/Docker Engine). ## Files Overview - **Dockerfile**: Defines the environment (Python 3.9) and dependencies. - **docker-compose.yml**: Orchestrates the container, maps ports (8000), and persists data (`news.db`). ## Deployment Steps 1. **Transfer Files**: Copy the entire project folder to your server. 2. **Navigate to Directory**: ```bash cd japan-news ``` 3. **Start the Service**: Run the following command to build and start the container in the background: ```bash docker-compose up -d --build ``` ## Managing the Service - **Check Logs**: ```bash docker-compose logs -f ``` - **Stop the Service**: ```bash docker-compose down ``` - **Restart**: ```bash docker-compose restart ``` ## Data Persistence The database file `news.db` is mapped to the container. - Even if you stop or remove the container, your data in `news.db` on the host machine will remain safe. - **Backup**: Simply backup the `news.db` file. ## Accessing the Application Open your browser and navigate to: `http://localhost:8000` (or your server's IP address: `http://:8000`)