django-postgres-vue-gitlab-ecs icon indicating copy to clipboard operation
django-postgres-vue-gitlab-ecs copied to clipboard

frontend homepage does not open

Open Cally99 opened this issue 4 years ago • 3 comments

Thank you for uploading such a detailed repo. There's so much best practice features using modern web technologies.

I've tried to run this repo with docker on my machine and I can access the backend but cannot open page verbose equals true.

I have a click wheel running trying to get the frontend homepage open but it does not finish building the container it seems.

In the logs it gets this far for frontend when I restart the container.

frontend | You may use special comments to disable some warnings. frontend | Use // eslint-disable-next-line to ignore the next line. frontend | Use /* eslint-disable */ to ignore all warnings in a file. frontend | ℹ 「wds」: Project is running at http://0.0.0.0:8080/ frontend | ℹ 「wds」: webpack output is served from / frontend | ℹ 「wds」: 404s will fallback to /index.html

What I basically did was edit the .env-template in root to .env and run docker-compose up

The page never loads.

Do you know what's causing this?

Thanks for such a great repo too!

Cally99 avatar Sep 03 '20 02:09 Cally99

Hi @Cally99 , thanks for the compliments and also for reporting the issue! I'm going to make some changes that should fix any local issues. In the meantime, you can try this other repo that has a similar setup for local development that I have been working with recently:

https://gitlab.com/verbose-equals-true/digital-ocean-docker-swarm

This repo should have more up-to-date dependencies, but it doesn't yet have the authentication flow built in yet, because I'm thinking of using DRF's Token authentication in favor of JWT, but I haven't implemented that yet.

It also has more straightforward hot-reloading for celery workers if that is important to you in local development. Also, it uses a much more straightforward docker swarm setup for production compared to the AWS CDK/Fargate solution.

Please let me know if you have any other question or issues with any aspect of this repo or the other linked repo.

briancaffey avatar Sep 03 '20 03:09 briancaffey

Hi Brian. No worries at all. This repo is packed with tech, frameworks and features. The reason I was trying to use this for my own project is that I was trying to implement django channel websockets. I've got a docker app containerised using DRF, Django, Celery and nuxt with Nginx. I actually used a repo called "spacenews" on github as my boilerplate. My app's architecture hasn't changed much from that repo but I've built my app based on that repo's structure. I've being trying to host my app on AWS just on an ec2 instance pushing code to the instance but I've had a few things in the tracker I wanted done, mainly websockets and another few things. What I've struggled to get working was the websockets feature with channels. I spend about a week back and forth trying to figure out why I'm not getting any feed in the browser. 403's and 500 errors. I seen this repo and thought maybe I'd figure out how your implementation of websockets would work since it's a well structured repo with many stars. Trying to combine webockets with nginix docker and channels is challenging since you have to read 5 different frameworks docs.

I'd happily like to give some time to help figure out the initial issue with this issue I spotted. I think it could be due to nginx not serving the frontend.

If you do have a repo with a working example of a dockerize django app with websockets and a seperate fronted that would be great! Sorry about the crazy ask!

Cally99 avatar Sep 05 '20 21:09 Cally99

Hi @Cally99 , i do have a repo that uses docker, Django and channels running in "production". It is hosted on DigitalOcean and uses docker swarm. Here's the repo link: https://gitlab.com/emojirama/game, it is deployed on https://superme.ga. It have had some issues with 'group_send', but for the most part it works pretty well and all in costs about $5/month to host. DigitalOcean might be a lot simpler to start with compared to AWS if you are trying to run things in swarm. I would be happy to look at it together with you to work through any issues with deployment. It should be pretty easy to spin up with docker-compose locally, so I would try that first. The nginx for dev and prod are almost the same, but I don't use traefik locally. I'll try to find the spacenews repo, I'm curious how that repo has set things up.

briancaffey avatar Sep 05 '20 22:09 briancaffey