Docker Development
Docker is a platform that allows developers to automate the deployment of applications inside lightweight, portable containers. Containers package an application with all its dependencies, ensuring that it runs consistently across different environments. This makes it easier to develop, ship, and run applications, as you can be confident that they will behave the same way in development, testing, and production.
For more information on Docker and to install it, visit the official Docker Documentation.
Install Docker Compose.
To get started, you need to create an environment file (.env
) and set all the required configurations. For more details on the necessary environment variables, please refer to the Environment Configuration page.
Building and Running the API
This step is primarily for users who want to explore the API without installing Golang locally.
First, clone the FaynoSync repository to your local machine:
git clone https://github.com/ku9nov/faynoSync.git
cd faynoSync
Now you can build and run the FaynoSync API along with all its dependencies using the following command:
docker compose up --build
This command will build the necessary Docker images and start the containers as defined in docker-compose.yaml
file.
Rebuilding the Docker images each time can be time-consuming, making this approach less suitable for active development. It's recommended mainly for initial setup and testing the API’s functionality rather than for regular development tasks.
Running Tests
Once the services are running, you can execute the test suite with the following command (please wait until the s3-service
successfully creates the bucket):
docker exec -it faynoSync_backend "/usr/bin/faynoSync_tests"
This command runs tests directly inside the faynoSync_backend
container.
Running Dependency Services for Local Development
If you prefer to work locally with Golang installed, you can start only the dependency services required for FaynoSync development by using this command:
docker compose -f docker-compose.yaml -f docker-compose.development.yaml up
This setup will start essential services like MongoDB and MinIO without running the full API in a container.
Make sure Golang is installed on your local machine. For instructions on setting up Golang, refer to the Golang Installation Guide.
Setting Up Admin Dashboard
The FaynoSync Admin Dashboard provides a web interface for managing your FaynoSync API server. Here's how to set it up locally:
Clone the Dashboard Repository
First, clone the admin dashboard repository:
git clone https://github.com/ku9nov/faynoSync-dashboard.git
cd faynoSync-dashboard
Environment Configuration
Copy the example environment file and configure it:
cp .env.example .env
The .env
file should contain:
VITE_API_URL=http://localhost:9000
VITE_PORT=3000
Make sure the VITE_API_URL
points to your running FaynoSync API server (default port 9000).
Install Dependencies
Install all necessary dependencies using yarn:
yarn install
Run the Dashboard
Start the dashboard in development mode:
yarn dev
This will launch the dashboard on http://localhost:3000
(or the port specified in your .env
file).
First-Time Setup
- Open the dashboard in your browser
- Register a new account using your
API_KEY
- Once registered, you can start using the dashboard to manage your FaynoSync server
The dashboard provides an intuitive interface for:
- Managing applications and versions
- Configuring channels and platforms
- Monitoring server health and statistics
- User and team management