[FIX] DOCKER: Issue with creating migration file for auth user model
This commit is contained in:
@@ -55,11 +55,11 @@ RUN apt-get update \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& apt-get clean
|
||||
|
||||
# Create non-root user
|
||||
# Create non-root user FIRST
|
||||
RUN useradd --create-home --uid 1000 appuser
|
||||
|
||||
# Copy virtual environment from builder stage
|
||||
COPY --from=builder /opt/venv /opt/venv
|
||||
# Copy virtual environment from builder stage WITH correct ownership
|
||||
COPY --from=builder --chown=appuser:appuser /opt/venv /opt/venv
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
@@ -82,4 +82,4 @@ HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 \
|
||||
CMD curl -f http://localhost:8000/health/ || exit 1
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
CMD ["gunicorn", "horilla.wsgi:application", "--config", "docker/gunicorn.conf.py"]
|
||||
CMD ["gunicorn", "horilla.wsgi:application", "--config", "docker/gunicorn.conf.py"]
|
||||
@@ -11,10 +11,11 @@ done
|
||||
echo "PostgreSQL is ready!"
|
||||
|
||||
# Run migrations
|
||||
python manage.py makemigrations
|
||||
python manage.py migrate --noinput
|
||||
|
||||
# Collect static files
|
||||
python manage.py collectstatic --noinput
|
||||
|
||||
echo "Starting server..."
|
||||
exec "$@"
|
||||
exec "$@"
|
||||
Reference in New Issue
Block a user