This repository has been archived by the owner on Aug 21, 2024. It is now read-only.
forked from Nekmo/angular-django
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue Nekmo#1: Server project using docker-compose
- Loading branch information
Showing
8 changed files
with
89 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
|
||
set -o errexit | ||
set -o pipefail | ||
set -o nounset | ||
|
||
python manage.py collectstatic --no-input | ||
python manage.py migrate --no-input | ||
python manage.py import_pokedex | ||
|
||
exec "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
upstream demo-upstream { | ||
ip_hash; | ||
server gunicorn:8000; | ||
} | ||
|
||
|
||
server { | ||
listen 80; | ||
|
||
set_real_ip_from 172.16.0.0/12; | ||
real_ip_header X-Forwarded-For; | ||
real_ip_recursive on; | ||
|
||
proxy_http_version 1.1; | ||
proxy_set_header Connection ""; | ||
proxy_redirect off; | ||
proxy_set_header Host $http_host; | ||
proxy_set_header X-Real-IP $http_x_real_ip; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header X-Forwarded-Host $server_name; | ||
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto; | ||
proxy_connect_timeout 300s; | ||
proxy_read_timeout 300s; | ||
|
||
location @backend { | ||
proxy_pass http://demo-upstream; | ||
} | ||
|
||
|
||
location ^~ /static/ { | ||
alias /static/; | ||
} | ||
|
||
location /media/ { | ||
internal; | ||
alias /media/; # note the trailing slash | ||
} | ||
|
||
location /api/ { | ||
try_files $uri $uri/ @backend; | ||
} | ||
|
||
location / { | ||
root /angular; | ||
try_files $uri $uri/ /index.html; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
Django | ||
django-rest-framework | ||
django-filter | ||
drf-writable-nested | ||
gunicorn | ||
requests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters