• Members 11 posts
    Sept. 29, 2019, 2:05 p.m.

    Hi,
    I can collect static files with function collectstatic in appctl, but the index.html is a blank file. When I manage static with nginx, I cann't see the entrance to index of misago. So, I'd like to figure it out how to build react static files and why no index.html file produced with gulp build. I‘d like to integrate misago with my local site using sso and I have to manage two static files with nginx. Could you show me how does it work with nginx? Looking forward to your reply, thanks!

  • Sept. 29, 2019, 8:59 p.m.

    but the index.html is a blank file

    It never had any content - it's there in case somebody tries to navigate to /static/ with directory listing enabled on their webserver.

    So, I'd like to figure it out how to build react static files and why no index.html file produced with gulp build.

    index.html is not build by gulp because its not needed for anything by Misago. gulp build buils css and js files, and places them directly in misago/static/misago directory, where they are found by dev server. When you run collectstatic, those files are copied to /static/ directory for NGINX to serve them to others.

  • Members 11 posts
    Sept. 30, 2019, 11:47 a.m.

    Thank you for your reply, I have finished my nginx configure and it works, but another problem bothers me. I runserver with gunicorn instead of uwsgi, and Misago works well under local DEBUG environment, but under production, I always get 500 error page which says that Something's broken.... Could you give me some inspirations, thanks~

  • Sept. 30, 2019, 6:56 p.m.

    Why are you not using misago-docker? Main repo is build for local development and doesn't support deployments.

  • Members 11 posts
    Oct. 1, 2019, 9:29 a.m.

    yeah, l used misago-docker repo but with my own nginx. When I ran server with command python manage.py runserver 8000 or gunicorn misagodocker.wsgi without docker, It worked under development environment. But I got 500 errors when I putted all env variables in as production environment.