Comments (1)
Hi @dreamflasher,
Thank you for the offer to update the README. I just want to make sure that it's clear how configuration works. And if you can update the README accordingly.
Anki-sync-server supports both a config file and environment variables. See how they work below.
- ankisyncd.conf (Config file)
- The config file can be found here:
src/ankisyncd.conf
. - Copying the config file from
src/ankisyncd.conf
tosrc/ankisyncd/ankisyncd.conf
will allow you to configure the server.
- .env.local (Environment variables)
- The environment variables can be found here:
config/.env.example
. - The file also includes other development variables, but the notable ones are the ones with the prefix
ANKISYNCD_
- Environment variables will override the config files values (which is why I recommend you use them)
- This is what we use in the Docker images (see: https://github.com/ankicommunity/anki-devops-services/blob/develop/services/anki-sync-server/examples/docker-compose.yml).
- Copying the config file from
config/.env.example
toconfig/.env.local
will allow you to configure the server when using themake
commands - You can also set it when running the server e.g.
ANKISYNCD_PORT=5001 make run
- The above two options are useful for development. But if you're only going for usage, you can also set it globally by adding it to your
~/.bashrc
file e.g.export ANKISYNCD_PORT=50001
Does that make sense?
Config files are typically better client-side i.e. when you're running it on your laptop. Environment variables are typically better server-side i.e. when you're using Docker.
I tend to prefer environment variables because they're global which is useful if you need to share configuration between different services. But at the current point, both are valid options on how to configure the server.
from ankicommunity-sync-server.
Related Issues (20)
- [Feature Request] LDAP Authentication HOT 2
- protobuf version issue HOT 4
- Anki (dektop) prompts to log in to AnkiWeb HOT 1
- Create Releases with Github HOT 2
- Docker Releases HOT 4
- Sync errors when trying to sync using anki 2.0.52 HOT 2
- AttributeError: module 'ankisyncd.config' has no attribute 'load' HOT 3
- Anki 2.1.49 will not sync via https proxy HOT 2
- network error HOT 1
- 'MediaManager' object has no attribute 'close' HOT 2
- Will be incompatible with new versions 2.1.57+ HOT 12
- Link in README leading to nothing HOT 1
- Anki desktop can't connect self-hosted server while ankiDroid could. HOT 6
- ci: Deploy docker image to DockerHub HOT 2
- Authentication failed for nonexistent user None. HOT 4
- anki23.10 generates JsonError { info: "missing field media usn at line 1 column 114" }
- Fix For: Python Error ./ankisyncctl.py - No Module named "ankisyncd"
- Windows new version v23.10.1 client cannot synchronize
- How to put the server on USB HDD? i am on 2.1.54 thx
- "IndexError: list index out of range" when syncing from Anki Desktop HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ankicommunity-sync-server.