whythawk / full-stack-fastapi-postgresql

Full stack, modern web application generator. Using FastAPI, PostgreSQL as database, Nuxt3, Docker, automatic HTTPS and more.
MIT License
231 stars 47 forks source link

Running into issues on M1 MacBook #26

Closed 0x108 closed 11 months ago

0x108 commented 1 year ago

Greetings,

first of all I want to say thank you for this clean project, I absolutely fell in love with the used technologies again and appreciate the effort very much.

After cloning the project, copying my .env file and ultimately running docker compose up I've ran into some errors, which I will list down below:

Overall I faced some issues, which apparently were caused by M1 builds not yet being correct - this was fixable by using the recommended solution in the StackOverflow post seen above: Changing the docker platform back to amd64 (export DOCKER_DEFAULT_PLATFORM=linux/amd64) and running it via Rosetta.

The Backend seems to work perfectly fine now (Entered the Swagger docs and tried some stuff), however I can't seem to get the frontend to work properly: Requests are being made, however keep failing

ient.ts:324     GET http://localhost:24678/_nuxt/ net::ERR_CONNECTION_REFUSED

Even though the page is properly getting displayed, this keeps occurring and requests to the backend do not get properly sent to the backend, however rather the responses contain HTML.

Thanks for reading and helping out,

Cheers!

turukawa commented 1 year ago

Hi @0x108 thanks for posting this. There's been a few issues related to the Docker version for Mac. I'm not able to replicate these issues or test them as I don't have the same dev environment.

PostgreSQL issue: I need to ensure generic consistency, so the Rosetta option seems a bit heavy. Have you tried the alternative suggestion? https://stackoverflow.com/a/74844319/295606

Nuxt/Vite issue: this seems to be about Docker not opening the port. Does this solve things? https://stackoverflow.com/a/75818603/295606