diff --git a/README.md b/README.md index 9b5c6af6..6032d869 100644 --- a/README.md +++ b/README.md @@ -95,10 +95,11 @@ This readme file is used mostly to document project dependencies - coreapi - psycopg2-binary - cctext + - pyconcept
- requirements_dev + requirements-dev
   - coverage
   - pylint
@@ -148,7 +149,6 @@ This readme file is used mostly to document project dependencies
 
 ## πŸ“¦ Production build
 
-- provide proper pyconcept wheel (ConceptCore) at 'rsconcept/backend/import/\*.whl'
 - provide secrets: 'secrets/db_password.txt', 'django_key.txt', 'email_host.txt', 'email_password.txt', 'email_user.txt'
 - check if you need to change SSL/TLS and PORT in 'rsconcept\backend\.env.prod'
 - setup domain names for application and API in configs: 'frontend\env\.env.production', 'rsconcept\backend\.env.dev', 'nginx\production.conf'
diff --git a/docker-compose-prod-local.yml b/docker-compose-prod-local.yml
index 39226700..afaca211 100644
--- a/docker-compose-prod-local.yml
+++ b/docker-compose-prod-local.yml
@@ -15,7 +15,7 @@ networks:
 services:
   frontend:
     container_name: local-portal-frontend
-    restart: always
+    restart: no
     depends_on:
       - backend
     build:
@@ -28,7 +28,7 @@ services:
 
   backend:
     container_name: local-portal-backend
-    restart: always
+    restart: no
     depends_on:
       - postgresql-db
     build:
@@ -43,7 +43,7 @@ services:
 
   postgresql-db:
     container_name: local-portal-db
-    restart: always
+    restart: no
     image: postgres:alpine
     env_file: ./postgresql/.env.prod.local
     volumes:
@@ -51,7 +51,7 @@ services:
 
   nginx:
     container_name: local-portal-router
-    restart: always
+    restart: no
     build:
       context: ./nginx
       dockerfile: Dockerfile.local
diff --git a/rsconcept/backend/!Readme.txt b/rsconcept/backend/!Readme.txt
deleted file mode 100644
index d799a65e..00000000
--- a/rsconcept/backend/!Readme.txt
+++ /dev/null
@@ -1 +0,0 @@
-Π˜ΠΌΠΏΠΎΡ€Ρ‚ΠΈΡ€ΡƒΠ΅ΠΌΡ‹Π΅ ΠΏΡ€Π΅Π΄ΠΊΠΎΠΌΠΏΠΈΠ»ΠΈΡ€ΠΎΠ²Π°Π½Π½Ρ‹Π΅ ΠΏΠ°ΠΊΠ΅Ρ‚Ρ‹ (*.whl) слСдуСт ΠΊΠ»Π°ΡΡ‚ΡŒ Π² import\
\ No newline at end of file
diff --git a/rsconcept/backend/.dockerignore b/rsconcept/backend/.dockerignore
index 76c44344..3af53493 100644
--- a/rsconcept/backend/.dockerignore
+++ b/rsconcept/backend/.dockerignore
@@ -2,7 +2,7 @@
 *.ps1
 
 # Dev specific
-requirements_dev.txt
+requirements-dev.txt
 .gitignore
 
 
diff --git a/rsconcept/backend/Dockerfile b/rsconcept/backend/Dockerfile
index b2c3114a..c16149e3 100644
--- a/rsconcept/backend/Dockerfile
+++ b/rsconcept/backend/Dockerfile
@@ -15,6 +15,7 @@ RUN apt-get update -qq && \
     add-apt-repository -y ppa:ubuntu-toolchain-r/test && \
     apt-get install -y --no-install-recommends \
         python3.12 \
+        python3.12-dev \
         libstdc++6 && \
     curl -sS https://bootstrap.pypa.io/get-pip.py | python3.12 && \
     python3.12 -m pip install --upgrade pip && \
@@ -31,8 +32,26 @@ FROM python-base as builder
 ENV PYTHONDONTWRITEBYTECODE 1
 ENV PYTHONUNBUFFERED 1
 
+# Setup additional dev tools
+RUN apt-get update -qq && \
+    apt-get full-upgrade -y && \
+    apt-get install -y --no-install-recommends \
+        software-properties-common \
+        build-essential && \
+    rm -rf /var/lib/apt/lists/*
+
+# Add GCC compiler
+ARG GCC_VER="13"
+RUN add-apt-repository -y ppa:ubuntu-toolchain-r/test && \
+    apt-get update -qq && \
+    apt-get install -y --no-install-recommends \
+        gcc-${GCC_VER} \
+        g++-${GCC_VER} && \
+    update-alternatives --install /usr/bin/gcc gcc $(which gcc-${GCC_VER}) 100 && \
+    update-alternatives --install /usr/bin/g++ g++ $(which g++-${GCC_VER}) 100 && \
+    rm -rf /var/lib/apt/lists/*
+
 COPY ./requirements.txt ./
-COPY ./import/*linux*.whl ./wheels/
 RUN python3.12 -m pip wheel \
         --no-cache-dir --no-deps \
         --wheel-dir=/wheels -r requirements.txt
diff --git a/rsconcept/backend/import/README.txt b/rsconcept/backend/import/README.txt
deleted file mode 100644
index d9b49a65..00000000
--- a/rsconcept/backend/import/README.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-copy compiled python wheels here
-
-1. pyconcept = ConceptCore: https://github.com/IRBorisov/ConceptCore
\ No newline at end of file
diff --git a/rsconcept/backend/requirements_dev.txt b/rsconcept/backend/requirements-dev.txt
similarity index 95%
rename from rsconcept/backend/requirements_dev.txt
rename to rsconcept/backend/requirements-dev.txt
index 403ae2f4..1c522d9d 100644
--- a/rsconcept/backend/requirements_dev.txt
+++ b/rsconcept/backend/requirements-dev.txt
@@ -6,6 +6,7 @@ django-filter
 drf-spectacular
 coreapi
 cctext
+pyconcept
 
 mypy
 pylint
diff --git a/rsconcept/backend/requirements.txt b/rsconcept/backend/requirements.txt
index 1f5b8273..1e8ae911 100644
--- a/rsconcept/backend/requirements.txt
+++ b/rsconcept/backend/requirements.txt
@@ -6,7 +6,8 @@ django-filter==24.2
 drf-spectacular==0.27.2
 coreapi==2.3.3
 django-rest-passwordreset==1.4.0
-cctext==0.1.2
+cctext==0.1.3
+pyconcept==0.1.1
 
 psycopg2-binary==2.9.9
-gunicorn==21.2.0
\ No newline at end of file
+gunicorn==22.0.0
\ No newline at end of file
diff --git a/scripts/dev/LocalDevSetup.ps1 b/scripts/dev/LocalDevSetup.ps1
index 442f9217..dc29c429 100644
--- a/scripts/dev/LocalDevSetup.ps1
+++ b/scripts/dev/LocalDevSetup.ps1
@@ -21,7 +21,6 @@ function BackendSetup() {
     ClearPrevious
     CreateEnv
     InstallPips
-    InstallImports
 }
 
 function ClearPrevious() {
@@ -38,18 +37,7 @@ function CreateEnv() {
 
 function InstallPips() {
     & $python -m pip install --upgrade pip
-    & $python -m pip install -r requirements_dev.txt --no-warn-script-location
-}
-
-function InstallImports() {
-    $wheel = Get-Childitem -Path import\*win*.whl -Name
-    if (-not $wheel) {
-        Write-Error 'Missing import wheel'
-        Exit 1
-    }
-    
-    Write-Host "Installing wheel: $wheel`n" -ForegroundColor DarkGreen
-    & $python -m pip install -I import\$wheel
+    & $python -m pip install -r requirements-dev.txt --no-warn-script-location
 }
 
 LocalDevelopmentSetup
\ No newline at end of file