From 7de4eedcb0c5a5b44a13825994fd397e70634249 Mon Sep 17 00:00:00 2001 From: Esa Kataja Date: Mon, 4 Aug 2025 15:55:30 +0300 Subject: [PATCH] chore: add container configuration with Dockerfile, docker-compose and makefile for deployment --- Dockerfile | 14 ++++++++++++++ docker-compose.yml | 6 ++++++ makefile | 13 +++++++++++++ 3 files changed, 33 insertions(+) create mode 100644 Dockerfile create mode 100644 docker-compose.yml create mode 100644 makefile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..3238f3c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +FROM python:3.12-slim +COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/ + +WORKDIR /app + +COPY pyproject.toml uv.lock /app/ + +RUN uv sync --locked + +COPY src . + +EXPOSE 8000 + +CMD ["uv", "run", "main.py"] diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..2dbc69f --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,6 @@ +services: + jobpostingparser: + image: localhost/jobpostingparser:latest + ports: + - "9000:8000" + \ No newline at end of file diff --git a/makefile b/makefile new file mode 100644 index 0000000..9373330 --- /dev/null +++ b/makefile @@ -0,0 +1,13 @@ +.PHONY: build run save + +build: + podman build . -t localhost/jobpostingparser:latest + +run: + podman-compose up -d --build + +save: + podman save -o jobpostingparser.tar localhost/jobpostingparser:latest + + + \ No newline at end of file