Skip to content

BlockCloud-dev/blockcloud-backend

Repository files navigation

BlockCloud Backend

codecov

BlockCloud is a Spring Boot-based backend service designed to support the core functionalities of the BlockCloud application.


📚 Documentation


🏁 Quick Start

Local Development

git clone https://github.com/your-username/blockcloud-backend.git
cd blockcloud-backend
./gradlew bootRun

Visit: http://localhost:8080

Run with Docker

# Run in development environment
docker-compose --profile dev up -d

# Run in production environment
docker-compose up -d

🚀 Deployment

Automated Deployment (GitHub Actions)

  1. Configure GitHub Secrets:

    • HOST: Server IP address
    • USERNAME: SSH username
    • SSH_KEY: SSH private key
    • PORT: SSH port (default: 22)
  2. Push to the main branch to trigger automated deployment.

Manual Deployment

# Run the deployment script
chmod +x scripts/deploy.sh
./scripts/deploy.sh production latest

🔧 Environment Variables

Create a .env file at the project root and set the following variables:

# Spring Boot profile
SPRING_PROFILES_ACTIVE=dev

# Database settings
SPRING_DATASOURCE_URL=jdbc:postgresql://localhost:5432/blockcloud_dev
SPRING_DATASOURCE_USERNAME=blockcloud
SPRING_DATASOURCE_PASSWORD=password

# JWT settings
JWT_SECRET=your-jwt-secret-key-here
JWT_EXPIRATION=86400000

# OAuth2 settings
GOOGLE_CLIENT_ID=your-google-client-id
GOOGLE_CLIENT_SECRET=your-google-client-secret

📄 License

This project is licensed under the MIT License.


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 5