mirror of
https://github.com/IRBorisov/ConceptPortal.git
synced 2025-06-26 13:00:39 +03:00
Move to loading pyconcept from pypi
This commit is contained in:
parent
17c784d8b7
commit
3810523ac5
|
@ -95,10 +95,11 @@ This readme file is used mostly to document project dependencies
|
||||||
- coreapi
|
- coreapi
|
||||||
- psycopg2-binary
|
- psycopg2-binary
|
||||||
- cctext
|
- cctext
|
||||||
|
- pyconcept
|
||||||
</pre>
|
</pre>
|
||||||
</details>
|
</details>
|
||||||
<details>
|
<details>
|
||||||
<summary>requirements_dev</summary>
|
<summary>requirements-dev</summary>
|
||||||
<pre>
|
<pre>
|
||||||
- coverage
|
- coverage
|
||||||
- pylint
|
- pylint
|
||||||
|
@ -148,7 +149,6 @@ This readme file is used mostly to document project dependencies
|
||||||
|
|
||||||
## 📦 Production build
|
## 📦 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'
|
- 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'
|
- 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'
|
- setup domain names for application and API in configs: 'frontend\env\.env.production', 'rsconcept\backend\.env.dev', 'nginx\production.conf'
|
||||||
|
|
|
@ -15,7 +15,7 @@ networks:
|
||||||
services:
|
services:
|
||||||
frontend:
|
frontend:
|
||||||
container_name: local-portal-frontend
|
container_name: local-portal-frontend
|
||||||
restart: always
|
restart: no
|
||||||
depends_on:
|
depends_on:
|
||||||
- backend
|
- backend
|
||||||
build:
|
build:
|
||||||
|
@ -28,7 +28,7 @@ services:
|
||||||
|
|
||||||
backend:
|
backend:
|
||||||
container_name: local-portal-backend
|
container_name: local-portal-backend
|
||||||
restart: always
|
restart: no
|
||||||
depends_on:
|
depends_on:
|
||||||
- postgresql-db
|
- postgresql-db
|
||||||
build:
|
build:
|
||||||
|
@ -43,7 +43,7 @@ services:
|
||||||
|
|
||||||
postgresql-db:
|
postgresql-db:
|
||||||
container_name: local-portal-db
|
container_name: local-portal-db
|
||||||
restart: always
|
restart: no
|
||||||
image: postgres:alpine
|
image: postgres:alpine
|
||||||
env_file: ./postgresql/.env.prod.local
|
env_file: ./postgresql/.env.prod.local
|
||||||
volumes:
|
volumes:
|
||||||
|
@ -51,7 +51,7 @@ services:
|
||||||
|
|
||||||
nginx:
|
nginx:
|
||||||
container_name: local-portal-router
|
container_name: local-portal-router
|
||||||
restart: always
|
restart: no
|
||||||
build:
|
build:
|
||||||
context: ./nginx
|
context: ./nginx
|
||||||
dockerfile: Dockerfile.local
|
dockerfile: Dockerfile.local
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
Импортируемые предкомпилированные пакеты (*.whl) следует класть в import\
|
|
|
@ -2,7 +2,7 @@
|
||||||
*.ps1
|
*.ps1
|
||||||
|
|
||||||
# Dev specific
|
# Dev specific
|
||||||
requirements_dev.txt
|
requirements-dev.txt
|
||||||
.gitignore
|
.gitignore
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,7 @@ RUN apt-get update -qq && \
|
||||||
add-apt-repository -y ppa:ubuntu-toolchain-r/test && \
|
add-apt-repository -y ppa:ubuntu-toolchain-r/test && \
|
||||||
apt-get install -y --no-install-recommends \
|
apt-get install -y --no-install-recommends \
|
||||||
python3.12 \
|
python3.12 \
|
||||||
|
python3.12-dev \
|
||||||
libstdc++6 && \
|
libstdc++6 && \
|
||||||
curl -sS https://bootstrap.pypa.io/get-pip.py | python3.12 && \
|
curl -sS https://bootstrap.pypa.io/get-pip.py | python3.12 && \
|
||||||
python3.12 -m pip install --upgrade pip && \
|
python3.12 -m pip install --upgrade pip && \
|
||||||
|
@ -31,8 +32,26 @@ FROM python-base as builder
|
||||||
ENV PYTHONDONTWRITEBYTECODE 1
|
ENV PYTHONDONTWRITEBYTECODE 1
|
||||||
ENV PYTHONUNBUFFERED 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 ./requirements.txt ./
|
||||||
COPY ./import/*linux*.whl ./wheels/
|
|
||||||
RUN python3.12 -m pip wheel \
|
RUN python3.12 -m pip wheel \
|
||||||
--no-cache-dir --no-deps \
|
--no-cache-dir --no-deps \
|
||||||
--wheel-dir=/wheels -r requirements.txt
|
--wheel-dir=/wheels -r requirements.txt
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
copy compiled python wheels here
|
|
||||||
|
|
||||||
1. pyconcept = ConceptCore: https://github.com/IRBorisov/ConceptCore
|
|
|
@ -6,6 +6,7 @@ django-filter
|
||||||
drf-spectacular
|
drf-spectacular
|
||||||
coreapi
|
coreapi
|
||||||
cctext
|
cctext
|
||||||
|
pyconcept
|
||||||
|
|
||||||
mypy
|
mypy
|
||||||
pylint
|
pylint
|
|
@ -6,7 +6,8 @@ django-filter==24.2
|
||||||
drf-spectacular==0.27.2
|
drf-spectacular==0.27.2
|
||||||
coreapi==2.3.3
|
coreapi==2.3.3
|
||||||
django-rest-passwordreset==1.4.0
|
django-rest-passwordreset==1.4.0
|
||||||
cctext==0.1.2
|
cctext==0.1.3
|
||||||
|
pyconcept==0.1.1
|
||||||
|
|
||||||
psycopg2-binary==2.9.9
|
psycopg2-binary==2.9.9
|
||||||
gunicorn==21.2.0
|
gunicorn==22.0.0
|
|
@ -21,7 +21,6 @@ function BackendSetup() {
|
||||||
ClearPrevious
|
ClearPrevious
|
||||||
CreateEnv
|
CreateEnv
|
||||||
InstallPips
|
InstallPips
|
||||||
InstallImports
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function ClearPrevious() {
|
function ClearPrevious() {
|
||||||
|
@ -38,18 +37,7 @@ function CreateEnv() {
|
||||||
|
|
||||||
function InstallPips() {
|
function InstallPips() {
|
||||||
& $python -m pip install --upgrade pip
|
& $python -m pip install --upgrade pip
|
||||||
& $python -m pip install -r requirements_dev.txt --no-warn-script-location
|
& $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
|
|
||||||
}
|
}
|
||||||
|
|
||||||
LocalDevelopmentSetup
|
LocalDevelopmentSetup
|
Loading…
Reference in New Issue
Block a user