Seraph is a project designed to manage and execute code nodes using a worker-based architecture. It leverages Rust's asynchronous capabilities and Docker for containerized execution of tasks.
Before setting up the project, ensure you have the following installed:
-
Rust: Install Rust using rustup:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
-
Docker: Install Docker by following the instructions for your platform on the Docker website.
-
Docker Compose: Ensure Docker Compose is installed. It is often bundled with Docker Desktop or can be installed separately.
-
Clone the repository:
git clone https://github.com/xpinked/seraph.git cd seraph
-
Build and start the services using Docker Compose:
docker-compose -f docker.env up --build -d
This will set up all dependencies and services required for local development.
-
Building dependencies images
The project has custom images dependencies for each language runtime.
Build these images before running the project, These images are the runtimes of specific languages.
- Python
docker build -t seraph_python -f docker/seraph_python/Dockerfile .
-
Start the backend server:
cargo run --bin seraph_backend
-
The server will be available at
http://127.0.0.1:8080
(or the address specified in your.env
file). -
Use tools like
curl
or Postman to interact with the API endpoints.
The project is using Sea ORM as the SQL migration manager,
Either within the docker container or in local setup apply this steps.
- Make sure you have sea-orm-cli installed:
cargo install sea-orm-cli
- Check migration status
sea-orm-cli migrate status
- Apply pending migrations
sea-orm-cli migrate up
We welcome contributions to Seraph! To contribute:
- Fork the repository and create a new branch for your feature or bugfix.
- Make your changes and ensure the code is well-documented.
- Run tests to verify your changes:
cargo test
- Submit a pull request with a detailed description of your changes.
- Follow Rust's standard formatting guidelines.
- Use
cargo fmt
to format your code. - Use
cargo clippy
to lint your code and fix any warnings.
If you encounter any issues, please open an issue on the GitHub repository with detailed information about the problem.
Thank you for contributing to Seraph! Together, we can make this project even better.