mirror of
https://github.com/IRBorisov/ConceptPortal.git
synced 2025-06-25 20:40:36 +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
|
||||
- psycopg2-binary
|
||||
- cctext
|
||||
- pyconcept
|
||||
</pre>
|
||||
</details>
|
||||
<details>
|
||||
<summary>requirements_dev</summary>
|
||||
<summary>requirements-dev</summary>
|
||||
<pre>
|
||||
- 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'
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
Импортируемые предкомпилированные пакеты (*.whl) следует класть в import\
|
|
@ -2,7 +2,7 @@
|
|||
*.ps1
|
||||
|
||||
# Dev specific
|
||||
requirements_dev.txt
|
||||
requirements-dev.txt
|
||||
.gitignore
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
coreapi
|
||||
cctext
|
||||
pyconcept
|
||||
|
||||
mypy
|
||||
pylint
|
|
@ -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
|
||||
gunicorn==22.0.0
|
|
@ -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
|
Loading…
Reference in New Issue
Block a user