Fix build system

This commit is contained in:
Ivan 2024-07-19 20:27:27 +03:00
parent 80e0849eaf
commit 3996673d9f
3 changed files with 4 additions and 14 deletions

View File

@ -65,9 +65,10 @@ RUN pip install --no-cache /wheels/* && \
rm -rf /wheels
# Copy application sources and setup permissions
COPY apps/ ./apps
COPY project/ ./project
COPY shared/ ./shared
COPY fixtures/ ./fixtures
COPY apps/ ./apps
COPY manage.py entrypoint.sh ./
RUN sed -i 's/\r$//g' $APP_HOME/entrypoint.sh && \
chmod +x $APP_HOME/entrypoint.sh && \

View File

@ -1,5 +1,5 @@
# ======== Multi-stage base ==========
FROM node:bullseye-slim AS node-base
FROM node:20-bullseye-slim AS node-base
RUN apt-get update -qq && \
apt-get upgrade -y && \
rm -rf /var/lib/apt/lists/*

View File

@ -2,25 +2,14 @@
# FOR DEVELOPEMENT BUILDS ONLY!
$container= Read-Host -Prompt "Enter backend container name: "
$backend = Resolve-Path -Path "$PSScriptRoot\..\..\rsconcept\backend"
function PopulateDevData() {
ImportInitialData
CreateAdmin
}
function ImportInitialData() {
docker exec `
-it $container `
python3.12 manage.py loaddata $backend\fixtures\InitialData.json
}
function CreateAdmin() {
docker exec `
-e DJANGO_SUPERUSER_USERNAME=admin `
-e DJANGO_SUPERUSER_PASSWORD=1234 `
-e DJANGO_SUPERUSER_EMAIL=admin@admin.com `
-it $container python3.12 manage.py createsuperuser --noinput
python3.12 manage.py loaddata ./fixtures/InitialData.json
}
PopulateDevData