# Queensway Europe Telco Portal - Docker (runs locally on this PC) A Docker container you run directly on your own PC, same setup as TostaSklad. Requires **Docker Desktop for Windows** (with WSL2 backend, the default) - download from https://www.docker.com/products/docker-desktop/ if you don't have it yet. ## First run Open a terminal (PowerShell) in this `QWE Telco` folder and run: ``` docker compose up -d --build ``` This builds the image from `TelcoPortal-source/` (Python/Flask app) and starts the container in the background. Open **http://localhost:8092/** in your browser. The Mobile Phones table is pre-loaded from the one-time Excel import (see `TelcoPortal-source/import_excel.py` and the main README). There is no login - anyone who can reach the URL can view and edit. ## Data persistence The `TelcoPortal-data/` folder next to this file is bind-mounted into the container so the database survives container restarts, rebuilds, and updates: - `TelcoPortal-data/telco.db` - the SQLite database (both Mobile Phones and Internet Connectivity tables live in this one file) **Back up by simply copying `TelcoPortal-data/telco.db`.** Nothing important lives inside the container itself. ## Common commands ``` docker compose logs -f # follow app logs docker compose ps # check container status docker compose down # stop and remove the container (data folder is untouched) docker compose up -d # start it again ``` ## Updating after you change the source code ``` docker compose up -d --build ``` This rebuilds the image with your latest changes from `TelcoPortal-source/` and replaces the running container. Your data in `TelcoPortal-data/` is not affected. ## Changing the port Edit the `ports:` line in `docker-compose.yml`, e.g. `"80:8000"` to use the standard HTTP port instead of 8092, then run `docker compose up -d` again. ## Note on this setup This was written and validated by running the Flask app directly (not inside Docker - Docker itself was not available where these files were generated), so the app logic, database, and import script are confirmed working end-to-end. The Docker build/run itself could not be executed from where these files were generated. Please run the "First run" command above and let me know if anything doesn't come up cleanly (e.g. build errors, port conflicts) so it can be fixed.