diff --git a/nginx/Dockerfile b/nginx/Dockerfile index 3548e84..3a45637 100644 --- a/nginx/Dockerfile +++ b/nginx/Dockerfile @@ -2,7 +2,7 @@ FROM nginx:latest # Copy custom configuration file to Nginx configuration directory -COPY ./nginx/nginx.conf /etc/nginx/nginx.conf +COPY ./nginx.conf /etc/nginx/nginx.conf # Expose port EXPOSE 80 diff --git a/nginx/nginx.conf b/nginx/nginx.conf index fbd7119..c26cacf 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -1,18 +1,25 @@ # nginx.conf +events { + # Configuration related to event processing + # For most cases, the default settings suffice +} # Default server configuration -server { - listen 80; - server_name localhost; - - location / { - # Forward requests to the uWSGI server - uwsgi_pass unix:/app/myapp.sock; - include /etc/nginx/uwsgi_params; - } - - location /static/ { - # Serve static files from the Django app - alias /app/static/; +http { + server { + listen 80; + server_name localhost; + + location / { + # Forward requests to the uWSGI server + #uwsgi_pass unix:/app/dynamicweb2.sock; + uwsgi_pass dynamicweb2:8000; + include /etc/nginx/uwsgi_params; + } + + location /static/ { + # Serve static files from the Django app + alias /app/static/; + } } }