Skip to content

Commit 3bb7619

Browse files
committed
Update running config
1 parent 8a7b677 commit 3bb7619

File tree

4 files changed

+26
-4
lines changed

4 files changed

+26
-4
lines changed

app/requirements.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
apache-libcloud==2.4.0
22
applicationinsights==0.11.7
3+
colour==0.1.5
4+
chardet==3.0.4
35
coverage==4.5.3
46
dj-database-url==0.5.0
5-
Django==2.1.7
7+
Django==2.1.11
68
django-cloud-browser==0.5.0
79
django-filter==2.0.0
810
django-heroku==0.3.1
@@ -11,7 +13,7 @@ django-widget-tweaks==1.4.2
1113
django-polymorphic==2.0.3
1214
django-pyodbc-azure==2.1.0.0
1315
django-rest-polymorphic==0.1.8
14-
djangorestframework==3.8.2
16+
djangorestframework==3.10
1517
djangorestframework-csv==2.1.0
1618
djangorestframework-filters==0.10.2
1719
environs==4.1.0
@@ -24,6 +26,8 @@ lockfile==0.12.2
2426
mixer==6.1.3
2527
model-mommy==1.6.0
2628
psycopg2-binary==2.7.7
29+
pyexcel==0.5.14
30+
pyexcel-xlsx==0.5.7
2731
python-dateutil==2.7.3
2832
pytz==2018.4
2933
requests==2.21.0

app/tools/run.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,15 @@
22

33
set -o errexit
44

5+
if [[ ! -d "staticfiles" ]]; then
6+
echo "Making staticfiles"
7+
python manage.py collectstatic --noinput;
8+
fi
9+
510
echo "Initializing database"
611
python manage.py wait_for_db
712
python manage.py migrate
8-
# python manage.py create_roles
13+
python manage.py create_roles
914

1015
if [[ -n "${ADMIN_USERNAME}" ]] && [[ -n "${ADMIN_PASSWORD}" ]] && [[ -n "${ADMIN_EMAIL}" ]]; then
1116
python manage.py create_admin \

docker-compose.prod.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ services:
66
command: ["/app/tools/run.sh", "0.0.0.0:8000"]
77
volumes:
88
- ./app/:/app/
9+
- static_volume:/app/staticfiles
910
environment:
1011
ADMIN_USERNAME: "admin"
1112
ADMIN_PASSWORD: "password"
@@ -26,8 +27,8 @@ services:
2627
nginx:
2728
build: ./nginx
2829
volumes:
29-
- static_volume:/home/app/web/staticfiles
3030
- www:/var/www/html:ro
31+
- static_volume:/static
3132
ports:
3233
- 80:80
3334
depends_on:

nginx/nginx.conf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,18 @@ server {
1313
proxy_set_header Host $host;
1414
proxy_redirect off;
1515
}
16+
17+
location /admin/ {
18+
proxy_pass http://backend:8000/admin/;
19+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
20+
proxy_set_header Host $host;
21+
proxy_redirect off;
22+
}
23+
24+
location /static/ {
25+
autoindex on;
26+
alias /static/;
27+
}
1628
}
1729

1830
server_tokens off;

0 commit comments

Comments
 (0)