Fix docker setup

This commit is contained in:
IRBorisov 2023-08-05 15:45:18 +03:00
parent 2bd47df3e3
commit 254499daa4
5 changed files with 13 additions and 5 deletions

View File

@ -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 # Application settings
SECRET_KEY=django-insecure-)rq@!&v7l2r%2%q#n!uq+zk@=&yc0^&ql^7%2!%9u)vt1x&j=d 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 ALLOWED_HOSTS=rs.acconcept.ru;localhost
CSRF_TRUSTED_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;localhost:3000 CORS_ALLOWED_ORIGINS=http://rs.acconcept.ru:3000;http://localhost:3000
# File locations # File locations

View File

@ -55,8 +55,9 @@ RUN pip install --no-cache /wheels/* && \
rm -rf /wheels rm -rf /wheels
# Copy application sources and setup permissions # Copy application sources and setup permissions
COPY apps/ ./apps/ COPY apps/ ./apps
COPY project/ ./project COPY project/ ./project
COPY data/ ./data
COPY manage.py entrypoint.sh ./ COPY manage.py entrypoint.sh ./
RUN sed -i 's/\r$//g' $APP_HOME/entrypoint.sh && \ RUN sed -i 's/\r$//g' $APP_HOME/entrypoint.sh && \
chmod +x $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/static && \
chmod -R a+rwx $APP_HOME/media chmod -R a+rwx $APP_HOME/media
RUN
USER app USER app
WORKDIR $APP_HOME WORKDIR $APP_HOME

View File

@ -11,7 +11,9 @@ then
echo "Ready!" echo "Ready!"
fi fi
cd $APP_HOME
python $APP_HOME/manage.py collectstatic --noinput --clear python $APP_HOME/manage.py collectstatic --noinput --clear
python $APP_HOME/manage.py makemigrations
python $APP_HOME/manage.py migrate python $APP_HOME/manage.py migrate
# Execute given input command # Execute given input command

View File

@ -70,7 +70,7 @@ function ViewLibrary({ schemas }: ViewLibraryProps) {
noDataComponent={<span className='flex flex-col justify-center p-2 text-center'> noDataComponent={<span className='flex flex-col justify-center p-2 text-center'>
<p>Список схем пуст</p> <p>Список схем пуст</p>
<p>Измените фильтр или создайти новую концептуальную схему</p> <p>Измените фильтр или создайте новую концептуальную схему</p>
</span>} </span>}
pagination pagination