-
Notifications
You must be signed in to change notification settings - Fork 191
Local Docker Compose Fixes #1555
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
husky had some deprecated lines
…se crash remove overzealous type from useRun to prevent compose crash
allow project id to be set using the TRIGGER_PROJECT_ID environment variable instead of hardcoding it in the config
…TTER_AUTH_URL use process.env.BETTER_AUTH_URL ?? process.env.NEXT_PUBLIC_BETTER_AUTH_URL to avoid duplication and ensure legacy compatibility
update concurrently to latest version
…BLIC_BETTER_AUTH_URL use process.env.NEXT_PUBLIC_PORTAL_URL ?? process.env.NEXT_PUBLIC_BETTER_AUTH_URL to maintain legacy compatibility while reducing duplication
this is to support the dedupe
this change was to get docker compose working locally, with a singular env file. this does exclude the migrations at the moment
…osthog not setup log noise posthog was being noisy for local enviornment users and/or users who do not use posthog.
…ompose config FORCE_DATABASE_WIPE_AND_RESEED added to reset db if someone is experimenting/currupted. also added the migrator and seeder to the local compose project so they would run migrations automatically, and the app and portal would wait to start. Also sending logs to docker now from seeder and migrator
to resolve error [Better Auth]: Your Better Auth config includes advanced.generateId which is deprecated. Please use advanced.database.generateId instead. This will be removed in future releases.
i misunderstood why we needed to point to auth over and over. this really needs to be an internal reference. so updated it to be static default if none was given
i decided that this would be better to return to how it was before, and allow the compose to set them with a default fallback.
put in the wrong fallback url
some more complicated tasks on low end databases would time out, this is important for scaling db's and local. so i increased the timeout from the default 5 seconds to 30. it can be increased further but 30 seconds is good as anything longer may run into client side aka browser, keep-alive limits
use previous app enviornment variable to set the unoptimized to true which should fix local images. this is as per recomendation on issue 1467 trycompai#1467
here is the rest of the fix
i brought in all the variables i could fine into this one here. the required ones to run are uncommented from best as i could glean.
@james-miview is attempting to deploy a commit to the Comp AI Team on Vercel. A member of the Team first needs to authorize it. |
updated readme with docker compose usage. I forgot to update an env variable on the app, did that too.
the fallback url got dropped, adding it back
pretty sure this wasnt me, but the pr says they want a screen shot of it running without errors, so debugging here we go.
@MiViewIT This is great, will review this later today or tomorrow |
added concurrency limits to help with smaller db's. fixed trigger.dev setup process for local. added safety/skip check for fleet.
merge comments got left in somehow, weird. removed them.
updated readme to include DB connection pooling notes, so trigger.dev dosnt overwhelm smaller db's
I relised that Trigger.dev was never going to run, because the deploy function was never invoked locally. So i added that to the build pipeline in the Dockerfile. Going through that i relised FLEET was being noisy, added a check to bypass if it was not given. Added Trigger.dev PAT token to bypass manual browser auth. Added Trigger.dev Task concurrency limits globally -- this may be unnessarry, but its also optional. I updated readme to support these changes. |
Litteral first Public PR for me, thanks for being my first. Do with this as you see fit or send it to the depths. personlly it is the difference between being able to run the app at all or not for me, in a way thats pseudo progromatic.
Title:
Fix: Restore local Docker-Compose & Local Environment Configuration
What does this PR do?
This PR fixes the local Docker Compose environment, restoring a working setup for developers (which was previously non-standard). It makes multiple changes so that running the project locally is smooth, reliable, and close to how production runs, without manual workarounds.
Commit Summary
Here are some of the key changes included:
.env
now contains required variables; many new vars added to support local compose.Visual Demo
Image Demo:
https://github.com/user-attachments/assets/c0acd5b8-35ac-4e00-a00d-b17d7bf5a3c3
Automated tests were updated to pass as a part of this PR, they shouldnt have failed because of me, i suspect they were stale.

(No "before" demo provided since setup was beyond my comprehension.)
Mandatory Tasks (DO NOT REMOVE)
/docs
) to reflect changed/added environment variables or setup steps.How should this be tested?
Local-Compose-Fixes
..env.example
to.env
(or equivalent), ensure all required environment variables are present.docker compose up --build
.Checklist