Skip to content
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

Improve server onboarding #1095

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open

Conversation

abooij
Copy link

@abooij abooij commented Oct 9, 2023

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

server/README.md Outdated Show resolved Hide resolved
@tasn
Copy link
Member

tasn commented Oct 18, 2023

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

@abooij
Copy link
Author

abooij commented Oct 18, 2023

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

@tasn
Copy link
Member

tasn commented Oct 18, 2023

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.

@abooij
Copy link
Author

abooij commented Nov 7, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants