svix-webhooks icon indicating copy to clipboard operation
svix-webhooks copied to clipboard

Improve server onboarding

Open abooij opened this issue 1 year ago • 4 comments

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:

  1. install rust toolchain and dependencies
  2. build project
  3. start ancillary services using docker compose
  4. start the server

abooij avatar Oct 09 '23 09:10 abooij

Thanks a lot! CI is failing, can you please take a look?

tasn avatar Oct 18 '23 20:10 tasn

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).)

abooij avatar Oct 18 '23 21:10 abooij

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.

tasn avatar Oct 18 '23 23:10 tasn

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.

abooij avatar Nov 07 '23 21:11 abooij