diff --git a/rsconcept/RunServer.ps1 b/rsconcept/RunServer.ps1 index 0b6c3be8..46d7b72d 100644 --- a/rsconcept/RunServer.ps1 +++ b/rsconcept/RunServer.ps1 @@ -46,7 +46,7 @@ function AddAdmin { $env:DJANGO_SUPERUSER_USERNAME = 'admin' $env:DJANGO_SUPERUSER_PASSWORD = '1234' $env:DJANGO_SUPERUSER_EMAIL = 'admin@admin.com' - & $pyExec $djangoSrc createsuperuser --noinput + & $pyExec $djangoSrc createsuperuser --noinput } function DoMigrations { diff --git a/rsconcept/backend/.env.dev b/rsconcept/backend/.env.dev index a719e182..7adbeaed 100644 --- a/rsconcept/backend/.env.dev +++ b/rsconcept/backend/.env.dev @@ -1,8 +1,11 @@ +# !! THIS IS NOT THE FINAL PRODUCTION SETTINGS !! +# PLEASE MAKE SURE TO SETUP A PROPER ENV FILE OUTSIDE SOURCE CONTROL SYSTEM + # Application settings SECRET_KEY=django-insecure-)rq@!&v7l2r%2%q#n!uq+zk@=&yc0^&ql^7%2!%9u)vt1x&j=d ALLOWED_HOSTS=rs.acconcept.ru;localhost -CSRF_TRUSTED_ORIGINS=http://rs.acconcept.ru:3000;localhost:3000 -CORS_ALLOWED_ORIGINS=http://rs.acconcept.ru:3000;localhost:3000 +CSRF_TRUSTED_ORIGINS=http://rs.acconcept.ru:3000;http://localhost:3000 +CORS_ALLOWED_ORIGINS=http://rs.acconcept.ru:3000;http://localhost:3000 # File locations diff --git a/rsconcept/backend/Dockerfile b/rsconcept/backend/Dockerfile index dc3d11e5..fbe1973f 100644 --- a/rsconcept/backend/Dockerfile +++ b/rsconcept/backend/Dockerfile @@ -55,8 +55,9 @@ RUN pip install --no-cache /wheels/* && \ rm -rf /wheels # Copy application sources and setup permissions -COPY apps/ ./apps/ +COPY apps/ ./apps COPY project/ ./project +COPY data/ ./data COPY manage.py entrypoint.sh ./ RUN sed -i 's/\r$//g' $APP_HOME/entrypoint.sh && \ chmod +x $APP_HOME/entrypoint.sh && \ @@ -64,6 +65,8 @@ RUN sed -i 's/\r$//g' $APP_HOME/entrypoint.sh && \ chmod -R a+rwx $APP_HOME/static && \ chmod -R a+rwx $APP_HOME/media +RUN + USER app WORKDIR $APP_HOME diff --git a/rsconcept/backend/entrypoint.sh b/rsconcept/backend/entrypoint.sh index db802bb4..4a1100bd 100644 --- a/rsconcept/backend/entrypoint.sh +++ b/rsconcept/backend/entrypoint.sh @@ -11,7 +11,9 @@ then echo "Ready!" fi +cd $APP_HOME python $APP_HOME/manage.py collectstatic --noinput --clear +python $APP_HOME/manage.py makemigrations python $APP_HOME/manage.py migrate # Execute given input command diff --git a/rsconcept/frontend/src/pages/LibraryPage/ViewLibrary.tsx b/rsconcept/frontend/src/pages/LibraryPage/ViewLibrary.tsx index dbea07bc..98c6ae01 100644 --- a/rsconcept/frontend/src/pages/LibraryPage/ViewLibrary.tsx +++ b/rsconcept/frontend/src/pages/LibraryPage/ViewLibrary.tsx @@ -70,7 +70,7 @@ function ViewLibrary({ schemas }: ViewLibraryProps) { noDataComponent={

Список схем пуст

-

Измените фильтр или создайти новую концептуальную схему

+

Измените фильтр или создайте новую концептуальную схему

} pagination