FIX: corregir permiso home de djangouser, warnings de regex y agregar CSRF_TRUSTED_ORIGINS para dominio publico
This commit is contained in:
+1
-2
@@ -23,10 +23,9 @@ COPY . /app/
|
||||
# Exponer el puerto
|
||||
EXPOSE 8000
|
||||
|
||||
# Crear un usuario no-root por seguridad (con home directory para Gunicorn)
|
||||
# Crear un usuario no-root por seguridad
|
||||
RUN adduser --disabled-password djangouser
|
||||
RUN chown -R djangouser:djangouser /app
|
||||
RUN mkdir -p /app/media /app/static && chown -R djangouser:djangouser /app/media /app/static
|
||||
USER djangouser
|
||||
|
||||
# Comando por defecto para iniciar Gunicorn con Uvicorn workers (Producción)
|
||||
|
||||
@@ -33,6 +33,7 @@ SECRET_KEY = env('SECRET_KEY', default='django-insecure-fallback-key')
|
||||
DEBUG = env('DEBUG')
|
||||
|
||||
ALLOWED_HOSTS = env.list('ALLOWED_HOSTS', default=['*'])
|
||||
CSRF_TRUSTED_ORIGINS = env.list('CSRF_TRUSTED_ORIGINS', default=[])
|
||||
|
||||
|
||||
# Application definition
|
||||
|
||||
@@ -9,6 +9,7 @@ services:
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
REDIS_URL: redis://redis:6379/0
|
||||
CSRF_TRUSTED_ORIGINS: "https://${APP_DOMAIN}"
|
||||
volumes:
|
||||
- erp_media:/app/media
|
||||
- erp_static:/app/static
|
||||
|
||||
Reference in New Issue
Block a user