Browse Source

Merge pull request #14 from BridgeCityBicycleCoop/development

One day the docker stuff will work.
feature/python-error-tracking
Drew Larson 8 years ago
committed by GitHub
parent
commit
12f3a653ed
  1. 2
      bikeshop_project/bikeshop/settings/base.py
  2. 5
      docker/nginx/Dockerfile
  3. 4
      docker/nginx/conf/nginx-site.conf

2
bikeshop_project/bikeshop/settings/base.py

@ -126,7 +126,7 @@ STATICFILES_DIRS = [
('vendor', os.path.join(BASE_DIR, 'vendor')), ('vendor', os.path.join(BASE_DIR, 'vendor')),
os.path.join(BASE_DIR, 'assets') os.path.join(BASE_DIR, 'assets')
] ]
STATIC_ROOT = 'STATIC'
STATIC_URL = '/static/' STATIC_URL = '/static/'
AUTH_USER_MODEL = 'registration.CustomUser' AUTH_USER_MODEL = 'registration.CustomUser'

5
docker/nginx/Dockerfile

@ -1,2 +1,5 @@
FROM nginx:alpine FROM nginx
RUN echo 'deb http://ftp.debian.org/debian jessie-backports main' | tee /etc/apt/sources.list.d/backports.list
RUN apt-get update
RUN apt-get install -y python-certbot -t jessie-backports
COPY conf/* /etc/nginx/conf.d/ COPY conf/* /etc/nginx/conf.d/

4
docker/nginx/conf/nginx-site.conf

@ -33,6 +33,10 @@ server {
try_files $uri @proxy_to_app; try_files $uri @proxy_to_app;
} }
location /static {
root /code/static;
}
location @proxy_to_app { location @proxy_to_app {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# enable this if and only if you use HTTPS # enable this if and only if you use HTTPS

Loading…
Cancel
Save