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

Automatically configure tokenserver from config #1648

Open
kyz opened this issue Jan 14, 2025 · 0 comments
Open

Automatically configure tokenserver from config #1648

kyz opened this issue Jan 14, 2025 · 0 comments

Comments

@kyz
Copy link

kyz commented Jan 14, 2025

The current state of setting up a syncserver is cumbersome, due to configuration being split between the config file and the database.

SyncServer-1.5 took its services and nodes configuration from the config file. Modern syncserver requires you to define it in a database, but you can only do that once the tables exist, for which you first need to run syncserver to create them. Setup looks like this:

  1. Create a database user account and databases
  2. Create or edit config.toml
  3. Run syncserver --config config.toml
  4. Let syncserver create database tables
  5. Stop syncserver
  6. Either use tools provided, or use raw SQL statements, to insert entries into the tokenserver's database (services and nodes tables)
  7. Start syncserver again

This makes it cumbersome to run syncserver "out of the box", for example as a Docker image. You either need a workflow like the above, or you need to manually create the schema that syncserver is going to use, so you can put configuration into the database before syncserver's first run.

I'd like to ask for tokenserver config (services/nodes) to be definable in config.toml file instead. Or at least an optional setting that starts tokenserver running with a single node on a defined public URL, e.g. tokenserver.single_node_url = "https://home-server.example.com/firefox-sync" ... so that no out-of-band SQL work is needed and syncserver can be ready to use on its first invocation.

┆Issue is synchronized with this Jira Task

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

No branches or pull requests

1 participant