diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..850a15d --- /dev/null +++ b/.env.example @@ -0,0 +1 @@ +LOCAL_PORT=5000 diff --git a/README.md b/README.md index 9253d52..d3d62a1 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,38 @@ pip install -r requirements.txt python app.py ``` +## Docker Compose + +Run the app with Docker Compose and configure the local host port via `.env`. + +1. Create a `.env` file in the project root (or copy `.env.example`): + +```bash +# macOS / Linux +cp .env.example .env + +# Windows (PowerShell) +Copy-Item .env.example .env +``` + +2. Set the local host port in `.env`: + +```dotenv +LOCAL_PORT=5000 +``` + +3. Build and start the container: + +```bash +docker compose up --build -d +``` + +4. Open the app in your browser: + +```text +http://localhost: +``` + Visit [https://date.elpatron.me](https://date.elpatron.me) for the live demo. ## License diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..a54f005 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,8 @@ +services: + datecalc: + build: + context: . + dockerfile: Dockerfile + ports: + - "${LOCAL_PORT:-5000}:5000" + restart: unless-stopped