feat: add docker-compose.yml for local development#2462
Open
pablo-ibco wants to merge 1 commit into
Open
Conversation
Previously, setting up the local environment required manually running Docker commands for Postgres, creating multiple databases and users by hand, and configuring each service independently. This adds a docker-compose.yml at the repo root that provides: - A Postgres 16 instance with healthcheck, persistent volume, and automatic initialization of both databases (citycatalyst + ccglobal) - The global-api service behind a full profile for when it's needed Usage: docker compose up # just the database docker compose --profile full up # database + global-api
lemilonkh
reviewed
Apr 13, 2026
| @@ -0,0 +1,36 @@ | |||
| services: | |||
Contributor
There was a problem hiding this comment.
Currently this file only starts the different database services, not the individual frontends and backend microservices. While that's fine and can certainly be helpful for local development, should we add citycatalyst, hiap, global-api etc. here for a full local deployment?
Previously we did this with e.g. minikube and our k8s config files (the idea was to not have separate configs for deployment and local development), but I think a docker-compose setup is certainly easier to get going with...
lemilonkh
approved these changes
Apr 14, 2026
Contributor
lemilonkh
left a comment
There was a problem hiding this comment.
Thanks, let's see if we can expand it in the future 👍
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
docker-compose.ymlat the repo root for local developmentscripts/init-databases.sqlto bootstrap both databases in a single Postgres instanceMotivation
Setting up the local environment currently requires multiple manual steps spread across different READMEs:
app/scripts/start-db.shfor the app databaseccglobaluser and database for the global-apiThere is no unified way to bring up the full local stack. This makes onboarding slow and error-prone — especially for new team members.
Changes
docker-compose.ymlcitycatalyst(primary) andccglobal(global-api) databases./global-api/Dockerfile, connects to thedbservice. Behind thefullprofile so it only starts when explicitly requestedscripts/init-databases.sqlccglobaluser and database on first Postgres startup (thecitycatalystdatabase is created automatically viaPOSTGRES_DB)Usage
Database only (most common for app development)
docker compose up -dThen run the app locally with hot reload
cd app && npm run devFull stack (database + global-api)
docker compose --profile full up -dTest plan
docker compose up -dstarts Postgres and both databases are createddocker compose --profile full up -dadditionally starts theglobal-api servicedocker compose down -vcleans up volumesapp/scripts/start-db.shstill works independently