Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ jobs:

- name: Setup pnpm
uses: pnpm/action-setup@v4.1.0
with:
version: ^10.2

- name: Get pnpm Store Directory
id: pnpm-cache
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Create Release
on:
push:
tags:
- 'v*'

jobs:
create:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Publish GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
name: ${{ github.ref_name }}
generate_release_notes: true
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Comment on lines +9 to +21

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI 4 days ago

In general, the fix is to explicitly declare a permissions block, either at the workflow root (applies to all jobs) or at the individual job level, granting only the minimum scopes required. For a release-creation workflow using softprops/action-gh-release, the job needs to write releases (and typically contents), so we should grant contents: write (and optionally a narrower contents: write without other write scopes). We do not need broad write access to issues, pull requests, etc., so we should avoid those unless the workflow actually uses them.

The best targeted fix here is to add a permissions block under the create job (right below runs-on: ubuntu-latest) specifying minimal necessary scopes. According to GitHub’s permission model, to create a release we need contents: write. We can therefore add:

    permissions:
      contents: write

immediately under runs-on: ubuntu-latest. This keeps existing functionality intact while constraining GITHUB_TOKEN to only what the job requires. No additional imports or libraries are involved, since this is just a YAML workflow configuration change within .github/workflows/create-release.yml.

Suggested changeset 1
.github/workflows/create-release.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml
--- a/.github/workflows/create-release.yml
+++ b/.github/workflows/create-release.yml
@@ -7,6 +7,8 @@
 jobs:
   create:
     runs-on: ubuntu-latest
+    permissions:
+      contents: write
     steps:
         - uses: actions/checkout@v4
         - name: Publish GitHub Release
EOF
@@ -7,6 +7,8 @@
jobs:
create:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Publish GitHub Release
Copilot is powered by AI and may make mistakes. Always verify output.
28 changes: 12 additions & 16 deletions docs/deploying/deploy-cloud.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ slug: /deploying/cloud

# Deploy to Cloud

Deploy Fleetbase on any cloud provider using Docker containers. This guide provides step-by-step instructions for deploying Fleetbase on popular cloud platforms including AWS, Google Cloud Platform, Microsoft Azure, DigitalOcean, and others.
Deploy Fleetbase on any cloud provider using Docker containers. This guide provides step-by-step instructions for deploying Fleetbase on popular cloud platforms including DigitalOcean, Google Cloud Platform, Microsoft Azure, Linode, and others.

## Overview

Expand Down Expand Up @@ -35,30 +35,26 @@ Before starting the deployment, ensure you have:
- **SSL Certificates**: For HTTPS (Let's Encrypt recommended)

### External Services (Optional)
- **Email Service**: AWS SES, SendGrid, Mailgun, or SMTP server
- **Email Service**: SendGrid, Mailgun, Postmark, or SMTP server
- **SMS Service**: Twilio account for SMS notifications
- **Maps Service**: Google Maps API key
- **Monitoring**: CloudWatch, Datadog, or similar

## Step 1: Provision Cloud Infrastructure

### AWS (Amazon Web Services)
### DigitalOcean

1. **Launch EC2 Instance**:
```bash
# Create EC2 instance with Ubuntu 20.04 LTS
# Instance type: t3.medium or larger
# Security group: Allow ports 22, 80, 443, 4200, 8000
```
1. **Create Droplet**:
- Choose Ubuntu 20.04 LTS or later
- Select $20/month plan (2 vCPUs, 4GB RAM) or higher
- Add SSH key for secure access
- Enable monitoring and backups

2. **Configure Security Groups**:
- SSH (22): Your IP address
- HTTP (80): 0.0.0.0/0
- HTTPS (443): 0.0.0.0/0
- Custom (4200): 0.0.0.0/0 (Console)
- Custom (8000): 0.0.0.0/0 (API)
2. **Configure Firewall**:
- Create firewall rules for ports 22, 80, 443, 4200, 8000
- Restrict SSH access to your IP address

3. **Attach Elastic IP** (recommended for production)
3. **Assign Reserved IP** (recommended for production)

### Google Cloud Platform (GCP)

Expand Down
27 changes: 24 additions & 3 deletions docs/deploying/deploy-on-premise.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,32 @@ slug: /deploying/on-premise

# Deploy on Premise

Deploy Fleetbase on your own infrastructure with complete control over your data and environment. This guide covers both Docker-based and native installations for on-premise deployments.
Deploy Fleetbase on your own infrastructure with complete control over your data and environment. This guide covers both CLI-based installation and manual Docker setup for on-premise deployments.

## Overview
## Recommended: CLI Installation

On-premise deployment gives you full control over your Fleetbase installation, ensuring data sovereignty, compliance with internal policies, and customization capabilities. This guide covers:
The easiest way to deploy Fleetbase on-premise is using the Fleetbase CLI:

```bash
npm install -g @fleetbase/cli
flb install-fleetbase --host 0.0.0.0 --environment production
```

This method:
- Automatically configures Docker containers
- Sets up production-ready environment variables
- Initializes all required services
- Takes approximately 5 minutes

For detailed instructions, see the [CLI Installation Guide](/getting-started/install/with-cli).

## Advanced: Manual Docker Setup

For users who need full control over the deployment process, follow the manual Docker setup below.

### Overview

Manual on-premise deployment gives you complete control over your Fleetbase installation, ensuring data sovereignty, compliance with internal policies, and customization capabilities. This guide covers:

- **Docker Deployment**: Containerized setup for easy management
- **Native Installation**: Direct installation on the host system
Expand Down
188 changes: 0 additions & 188 deletions docs/deploying/deploy-to-aws.md

This file was deleted.

Loading