File tree 2 files changed +7
-1
lines changed
2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,8 @@ services:
30
30
container_name : app
31
31
restart : on-failure
32
32
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 &&
34
35
uwsgi --ini /opt/codebuddies/uwsgi.ini"
35
36
volumes :
36
37
- ./project:/opt/codebuddies
@@ -51,6 +52,7 @@ services:
51
52
- " 8000:80"
52
53
volumes :
53
54
- ./nginx:/etc/nginx/conf.d
55
+ - ./project/staticfiles/:/static
54
56
command : ' /bin/sh -c '' while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g "daemon off;"'' '
55
57
depends_on :
56
58
- app
Original file line number Diff line number Diff line change @@ -6,6 +6,10 @@ server {
6
6
listen 80;
7
7
server_name localhost;
8
8
9
+ location /static/ {
10
+ alias /static/;
11
+ }
12
+
9
13
location / {
10
14
proxy_pass http://app;
11
15
proxy_set_header Host $http_host;
You can’t perform that action at this time.
0 commit comments