You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Makefile
+99-4Lines changed: 99 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ BLUE=\033[0;34m
16
16
CYAN=\033[0;36m
17
17
NC=\033[0m # No Color
18
18
19
-
.PHONY: all help dev build-ui build run install-air clean test install-ui setup-workspace work-init work-clean docs docker-build cleanup-enterprise
19
+
.PHONY: all help dev build-ui build run install-air clean test install-ui setup-workspace work-init work-clean docs build-docker-image cleanup-enterprise deploy-to-fly-io
@@ -177,3 +178,97 @@ work-init: ## Create local go.work to use local modules for development (legacy)
177
178
work-clean: ## Remove local go.work
178
179
@rm -f go.work go.work.sum ||true
179
180
@echo "$(GREEN)Removed local go.work files$(NC)"
181
+
182
+
183
+
# Deployment scripts for different platforms
184
+
185
+
deploy-to-fly-io: ## Deploy to Fly.io (Usage: make deploy-to-fly-io APP_NAME=your-app-name)
186
+
@echo "$(BLUE)Starting Fly.io deployment...$(NC)"
187
+
@echo ""
188
+
@# Check if APP_NAME is provided
189
+
@if [ -z"$(APP_NAME)" ];then\
190
+
echo"$(RED)Error: APP_NAME is required$(NC)";\
191
+
echo"$(YELLOW)Usage: make deploy-to-fly-io APP_NAME=your-app-name$(NC)";\
192
+
exit 1;\
193
+
fi
194
+
@echo "$(YELLOW)Checking prerequisites...$(NC)"
195
+
@# Check if docker is installed
196
+
@which docker > /dev/null || (echo "$(RED)Error: Docker is not installed. Please install Docker first.$(NC)"&&exit 1)
197
+
@echo "$(GREEN)✓ Docker is installed$(NC)"
198
+
@# Check if flyctl is installed
199
+
@which flyctl > /dev/null || (echo "$(RED)Error: flyctl is not installed. Please install flyctl first.$(NC)"&&exit 1)
200
+
@echo "$(GREEN)✓ flyctl is installed$(NC)"
201
+
@# Check if app exists on Fly.io
202
+
@flyctl status -a $(APP_NAME)> /dev/null 2>&1|| (echo "$(RED)Error: App '$(APP_NAME)' not found on Fly.io$(NC)"&&echo"$(YELLOW)Create the app first with: flyctl launch --name $(APP_NAME)$(NC)"&&exit 1)
203
+
@echo "$(GREEN)✓ App '$(APP_NAME)' exists on Fly.io$(NC)"
204
+
@echo ""
205
+
@# Check if fly.toml exists, create temp if needed
206
+
@if [ -f"fly.toml" ];then\
207
+
echo"$(GREEN)✓ Using existing fly.toml$(NC)";\
208
+
else\
209
+
echo"$(YELLOW)fly.toml not found in current directory$(NC)";\
210
+
echo"$(CYAN)Would you like to create a temporary fly.toml with 2 vCPU configuration?$(NC)";\
211
+
echo"$(CYAN)(It will be removed after deployment)$(NC)";\
description: "This guide explains how to deploy Bifrost on fly.io"
4
+
icon: "fly"
5
+
---
6
+
7
+
As `Bifrost` uses multiple sub-modules (`core`, `framework`, etc.) and also embeds the front-end into a single binary (embed.FS), we use a custom Docker build step before we hand over the deployment to flyctl.
8
+
9
+
There are two ways to deploy Bifrost on Fly.io:
10
+
11
+
1. By cloning the repo
12
+
2. Using flyctl + Docker Hub image
13
+
14
+
## By cloning the repo
15
+
16
+
1. Clone https://github.com/maximhq/bifrost
17
+
2. Ensure [Make](/deployment-guides/how-to/install-make) is installed.
18
+
3. Run `make deploy-to-fly-io APP_NAME=<your-fly-app-name>`
19
+
20
+
21
+
## Using flyctl + Docker Hub image
22
+
23
+
1. Update your `fly.toml` to specify the Bifrost Docker Hub image.
24
+
25
+
```toml
26
+
[build]
27
+
image = "maximhq/bifrost:latest"
28
+
```
29
+
30
+
2. Or you can specify the Docker Hub image path in the command:
0 commit comments