Skip to content

Commit

Permalink
feat: add production configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
narenaryan committed Apr 7, 2023
1 parent b3d588b commit 6eca4ae
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ ENV DJANGO_SETTINGS_MODULE vidura.settings

# Set the working directory
# arbitrary location choice: you can change the directory
RUN mkdir -p /opt/services/djangoapp/src
WORKDIR /opt/services/djangoapp/src
RUN mkdir -p /opt/services/djangoapp
WORKDIR /opt/services/djangoapp

# Copy requirements.txt and install dependencies
COPY requirements.txt /opt/services/djangoapp/src
COPY requirements.txt /opt/services/djangoapp
RUN pip install --no-cache-dir -r requirements.txt

# Copy the rest of the project
COPY . /opt/services/djangoapp/src
COPY . /opt/services/djangoapp

RUN python manage.py collectstatic --no-input -v 2

Expand Down
3 changes: 1 addition & 2 deletions config/nginx/conf.d → config/nginx/conf.d/local.conf
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,12 @@ server {
proxy_set_header Host $host;
proxy_redirect off;
}

location /static/ {
autoindex on;
alias /opt/services/djangoapp/static/;
}

location /media/ {
autoindex on;
alias /opt/services/djangoapp/media/;
}
}

0 comments on commit 6eca4ae

Please sign in to comment.