Closed ocodista closed 6 months ago
i'm working on it
i'm working on it
Thank you! Assigned the issue to you
Hi @ocodista, I'm not with enough time to work on this issue as I want, so I would like to allow others to try too removing the assigned (In parallel, I'll still be working on it.). Also, about the project, I'm facing some problems with Turbo running the project after the first time.
And seemingly is about the project turbo version. https://github.com/vercel/turbo/issues/5331
Awesome, thank you @OtavioSC.
From what I read, it's a problem with the latest versions of turbo, apparently, setting the version to 1.10.4 solves this issue.
I'd like to take on this issue! @ocodista.
@LucasMallmann You got it
@ocodista I have a doubt: when I try to click on "Quero Participar" in my localhost, I receive an error with status 500. When the button is clicked, it fires a request to the localhost:3000/api/subscribers
, and this route does not exist.
This comes from a direct call to a fetch call in the saveSubscriber
method
Should this route exist? Am I missing some configuration?
Never mind, I found the api route in the web/app
folder. I'll try to debug here :)
Actually the route is on the apps/web/app/api/subscribers/route.ts
file.
The errors is happening on the side of the server (That's why it's returning 500).
If the route was not found the error would be a 404.
Forgot to mention, but this issue is being tracked on this branch: https://github.com/LucasMallmann/trampar-de-casa/tree/feat/dev-docker-setup
I managed to start all the supabase services locally. Now I'm creating a separate container to run the frontend application.
@LucasMallmann Nice!
We'll take a look as soon as you open a PR for it.
Hey @ocodista I think I need some help setting up the docker to run all the yarn workspaces. I'm having a hard time figuring out how to make all the things to communicate well in a docker container.
Hey @ocodista I think I need some help setting up the docker to run all the yarn workspaces. I'm having a hard time figuring out how to make all the things to communicate well in a docker container.
I can try to help you with that. This task unblocks Issue #69 so it would be nice to close it off
Hit me up on Discord (siriushunter) or Twitter (complainin_dev). I would like to get involved in this task if possible.
Hello @raphaelvdossantos, thank you for your support! I have just opened a pull request describing the main issue. It might be a good idea to open a separate issue to address the Next.js setup, or we could further discuss to explore a better solution.
I have also sent you a Discord invitation so that we can communicate better about it.
any news about the docker-compose?
any news about the docker-compose?
@LucasMallmann and I are working on it.
Hello ! I would like to take on this issue
Hello @emanamoura please go ahead!
A couple things I found while looking for a solution:
Trying to get it to work on my end, but no promises. Feel free to reach out if you want to collaborate @emanamoura
Current progress:
Got the container to run properly, but turbo dev
fails; got the same issue running outside the container, think it's missing some setup steps on the database side
❯ docker compose up
[+] Building 0.0s (0/0) docker:desktop-linux
[+] Running 1/0
✔ Container trampardecasa-web Created 0.0s
Attaching to trampardecasa-web
trampardecasa-web | • Packages in scope: analytics, db, email-composer, email-pre-renderer, email-sender, eslint-config-custom, roles-assigner, roles-renderer, roles-validator, shared, web
trampardecasa-web | • Running dev in 11 packages
trampardecasa-web | • Remote caching disabled
trampardecasa-web | db:dev: cache bypass, force executing 46d8ab9fb0b1e83b
trampardecasa-web | web:dev: cache bypass, force executing 97f81df84496f6fc
trampardecasa-web | db:dev: yarn run v1.22.19
trampardecasa-web | web:dev: yarn run v1.22.19
trampardecasa-web | db:dev: $ BROWSER=none prisma studio
trampardecasa-web | web:dev: $ next dev
trampardecasa-web | db:dev: Error: Provided schema path `prisma/schema.prisma` from `package.json` doesn't exist.
trampardecasa-web | db:dev: error Command failed with exit code 1.
trampardecasa-web | db:dev: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
trampardecasa-web | db:dev: ERROR: command finished with error: command (/app/packages/db) yarn run dev exited (1)
trampardecasa-web | web:dev:
trampardecasa-web | db#dev: command (/app/packages/db) yarn run dev exited (1)
trampardecasa-web |
trampardecasa-web | Tasks: 0 successful, 2 total
trampardecasa-web | Cached: 0 cached, 2 total
trampardecasa-web | Time: 864ms
trampardecasa-web | Failed: db#dev
trampardecasa-web |
trampardecasa-web | ERROR run failed: command exited (1)
trampardecasa-web exited with code 1
@ocodista Any idea why the packages/db/prisma
directory is gone?
Last commit I could find with it still in place was dc31219
, and without it turbo dev
fails like in the message above
Sup, guys! I would love to work on this, but I'm having a lot of trouble setting up my environment. It seems that packages/db/prisma/schema.json is an autogenerated required file, but it was removed in the PR https://github.com/ocodista/trampar-de-casa/pull/141, was it an error? Or should I generate a new one?
FYI
The previous error with schema.json was due to the db:start
script being obsolete, removing the prisma part solved it.
About the task, I've got an almost working version of it, my main problems now are mongodb missing in packages/shared
, and the Dockerfile being over 4gb. I've used the apps/auto-email-sender/email-sender/Dockerfile
as a base, but surely there is room for improvement. I've never used Turbo before, but the docs seems to have some instructions for Docker.
Once I solve these main problems, I'm thinking of making a Makefile to ease the process of seeding the Supabase instance.
I am also planning to finish this today, after some sleep and work-up, if there is no one further from the point that I am, I'll gladly ask to be assigned to it.
@jppradoleal @albertofp check my newest improvement to README on #179.
You should be able to run everything you need now (We are not using Prisma anymore).
Hey @emanamoura I saw that you were assigned, but since I didn't find any commit related in your fork, I took the chance to open the PR https://github.com/ocodista/trampar-de-casa/pull/180 that closes this issue. I've also seen the @LucasMallmann closed PR. If you guys can have a look at it, and share some insights, it would be a pleasure.
Currently is not that easy to setup the dev environment as you need to create your own supabase db and manually add a lot of envs to the apps/web/.env file.
The main goal of this issue is to fulfill the happy path by locally spinning up all the required containers for the app.
Happy path
docker-compose up
on the rootlocalhost:3000