A Rust-based port of the Kotatsu sync server, originally written in Kotlin. This project serves as a personal deep dive into the Axum framework and the Rust ecosystem, with implementing Clean Architecture principles.
kotatsu-syncserver: https://github.com/KotatsuApp/kotatsu-syncserver
https://github.com/kido1611/rustatsu-sync-server/
Warning
Incompatible with the original Kotatsu configuration.
The easiest way to run Rustatsu is using Docker. You can pull the image directly from Docker Hub:
docker pull abduzzy/rustatsu-sync:latest
then run with:
docker run -d \
--name rustatsu-sync \
-p 8080:8080 \
-e DATABASE__HOST=your_db_host \
-e DATABASE__PORT=5432 \
-e DATABASE__USERNAME=postgres \
-e DATABASE__PASSWORD=password \
-e DATABASE__DATABASE_NAME=rustatsu \
-e APPLICATION__RUN_MIGRATION=true \
-e RUST_LOG=info \
abduzzy/rustatsu-sync:latest
You can use the provided docker-compose.yaml file to start using rustatsu.
services:
rustatsu:
image: abduzzy/rustatsu-sync:latest
ports:
- "8000:8000"
environment:
- DATABASE__HOST=postgresql
- DATABASE__PORT=5432
- DATABASE__USERNAME=postgres
- DATABASE__PASSWORD=password
- DATABASE__DATABASE_NAME=rustatsu
# - APPLICATION__PORT=8080
# - APPLICATION__HOST=0.0.0.0
# - APPLICATION__ALLOW_REGISTRATION=true
# - APPLICATION__RUN_MIGRATION=TRUE
# - JWT__SECRET=my-secret-key
# - JWT__ISS=rustatsu
# - JWT__AUD=rustatsu
- RUST_LOG=warn
restart: always
depends_on:
- postgresql
postgresql:
image: postgres:17.3-alpine3.20
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_DB: rustatsu
restart: unless-stopped
volumes:
- "pgdata:/var/lib/postgresql/data"
volumes:
pgdata:
The following environment variables can be used to configure the app.
| Variable | Description |
|---|---|
| DATABASE__HOST | PostgreSQL host address |
| DATABASE__PORT | PostgreSQL port (Default: 5432) |
| DATABASE__USERNAME | Database user |
| DATABASE__PASSWORD | Database password |
| DATABASE__DATABASE_NAME | Name of the database |
| APPLICATION__PORT | Server port (Default: 8080) |
| APPLICATION__HOST | Server host (Default: 0.0.0.0) |
| APPLICATION__ALLOW_REGISTRATION | Toggle user registration (true/false) |
| APPLICATION__RUN_MIGRATION | Automatically run migrations on start (required on first run or after upgrade to setup database) |
| JWT__SECRET | Secret key for JWT signing |
| RUST_LOG | Logging level (error, warn, info, debug) |
This project is licensed under the GNU General Public License v3.0.
Content type
Image
Digest
sha256:a14b19e91…
Size
5.5 MB
Last updated
6 months ago
docker pull abduzzy/rustatsu-sync