From 6236657d9abfcbf1536834b82b362f69789a6ddb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Gruszczy=C5=84ski?= Date: Sat, 27 Sep 2025 21:36:26 +0200 Subject: [PATCH] python 3.14, pgsql 18 --- Dockerfile | 37 +------------------------------------ deploy/app/Dockerfile | 35 +++++++++++++++++++++++++++++++++++ docker-compose.yml | 19 +++++++++++++++---- 3 files changed, 51 insertions(+), 40 deletions(-) mode change 100644 => 120000 Dockerfile create mode 100644 deploy/app/Dockerfile diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 09c852d..0000000 --- a/Dockerfile +++ /dev/null @@ -1,36 +0,0 @@ -# Używamy lekkiego obrazu Pythona -FROM python:3.13-slim - -# Ustawiamy katalog roboczy -WORKDIR /app - -# Zależności systemowe do OCR, obrazów, tesseract i języka PL -RUN apt-get update && apt-get install -y --no-install-recommends \ - tesseract-ocr \ - tesseract-ocr-pol \ - libglib2.0-0 \ - libsm6 \ - libxrender1 \ - libxext6 \ - poppler-utils \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - -# Kopiujemy wymagania -COPY requirements.txt requirements.txt - -# Instalujemy zależności -RUN pip install --no-cache-dir -r requirements.txt - -# Kopiujemy resztę aplikacji -COPY . . - -# Kopiujemy entrypoint i ustawiamy uprawnienia -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x /entrypoint.sh - -# Otwieramy port -EXPOSE 8000 - -# Ustawiamy entrypoint -ENTRYPOINT ["/entrypoint.sh"] diff --git a/Dockerfile b/Dockerfile new file mode 120000 index 0000000..019363a --- /dev/null +++ b/Dockerfile @@ -0,0 +1 @@ +deploy/app/Dockerfile \ No newline at end of file diff --git a/deploy/app/Dockerfile b/deploy/app/Dockerfile new file mode 100644 index 0000000..542ffd4 --- /dev/null +++ b/deploy/app/Dockerfile @@ -0,0 +1,35 @@ + +FROM python:3.14-rc-trixie +#FROM python:3.13-slim +WORKDIR /app + +# Zależności systemowe do OCR, obrazów, tesseract i języka PL +RUN apt-get update && apt-get install -y --no-install-recommends \ + tesseract-ocr \ + tesseract-ocr-pol \ + libglib2.0-0 \ + libsm6 \ + libxrender1 \ + libxext6 \ + poppler-utils \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* + +# Kopiujemy wymagania +COPY requirements.txt requirements.txt + +# Instalujemy zależności +RUN pip install --no-cache-dir -r requirements.txt + +# Kopiujemy resztę aplikacji +COPY . . + +# Kopiujemy entrypoint i ustawiamy uprawnienia +COPY entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh + +# Otwieramy port +#EXPOSE 8000 + +# Ustawiamy entrypoint +ENTRYPOINT ["/entrypoint.sh"] diff --git a/docker-compose.yml b/docker-compose.yml index ee90856..001d5e1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -39,11 +39,13 @@ services: retries: 3 env_file: - .env + networks: + - lista-zakupow_network restart: unless-stopped pgsql: - image: postgres:17 - container_name: pgsql-db + image: postgres:latest + container_name: lista-zakupow-pgsql-db environment: POSTGRES_DB: ${DB_NAME} POSTGRES_USER: ${DB_USER} @@ -51,11 +53,13 @@ services: volumes: - ./db/pgsql:/var/lib/postgresql/data restart: unless-stopped + networks: + - lista-zakupow_network profiles: ["pgsql"] mysql: image: mysql:8 - container_name: mysql-db + container_name: lista-zakupow-mysql-db environment: MYSQL_DATABASE: ${DB_NAME} MYSQL_USER: ${DB_USER} @@ -64,4 +68,11 @@ services: volumes: - ./db/mysql:/var/lib/mysql restart: unless-stopped - profiles: ["mysql"] \ No newline at end of file + networks: + - lista-zakupow_network + profiles: ["mysql"] + +networks: + lista-zakupow_network: + driver: bridge + name: lista-zakupow_default \ No newline at end of file