svix-webhooks
svix-webhooks copied to clipboard
Improve server onboarding
Motivation
I wanted to play around with the server codebase, but got stuck while following the instructions.
Solution
I tried to fix any problems I found, such as the port numbers in development.env
not matching the port numbers of the docker compose configs.
I also reorganized the docker compose files, deduplicating configuration using include
syntax. It now exposes PG and Redis ports by default, i.e. the docker-compose.override.yml
file is no longer needed. The auth token is now set via docker-compose.docker-image.yml
. The instructions now use the new v2 docker compose
syntax.
I combined some steps in the README
that belong together, so that there is a clear sequence of steps:
- install rust toolchain and dependencies
- build project
- start ancillary services using
docker compose
- start the server
Thanks a lot! CI is failing, can you please take a look?
Can't reproduce this locally, so I'm counting on the failure being a Docker Compose file version thing. (Newer versions of Docker Compose largely ignore this file version, which would explain why it Works For Me (tm).)
Thanks!
Btw, I see you changed some of the ports and how hey are exposed. This is a thing we do on purpose as we have many services locally and we want to make sure we expose the ports in a way that don't clash. I think it's worth bringing this back.
Hmm, I've thought about the ports issue for a bit. To be honest, I don't see a canonical way out there. Ideally, the Docker Compose include
feature would support amending definitions in the services
section, but that simply raises an error:
imported compose file [/home/auke/svix-webhooks/server/docker-compose.base.yml] defines conflicting service postgres
I have a branch that fixes the CI issues, but we should first figure out how to orchestrate port opening.