File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,8 @@ services:
3030 container_name : app
3131 restart : on-failure
3232 command : >
33- sh -c "python /opt/codebuddies/manage.py migrate &&
33+ sh -c "python /opt/codebuddies/manage.py collectstatic --clear --no-input &&
34+ python /opt/codebuddies/manage.py migrate &&
3435 uwsgi --ini /opt/codebuddies/uwsgi.ini"
3536 volumes :
3637 - ./project:/opt/codebuddies
@@ -51,6 +52,7 @@ services:
5152 - " 8000:80"
5253 volumes :
5354 - ./nginx:/etc/nginx/conf.d
55+ - ./project/staticfiles/:/static
5456 command : ' /bin/sh -c '' while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g "daemon off;"'' '
5557 depends_on :
5658 - app
Original file line number Diff line number Diff line change @@ -6,6 +6,10 @@ server {
66 listen 80;
77 server_name localhost;
88
9+ location /static/ {
10+ alias /static/;
11+ }
12+
913 location / {
1014 proxy_pass http://app;
1115 proxy_set_header Host $http_host;
You can’t perform that action at this time.
0 commit comments