4 Commits

5 changed files with 18 additions and 25 deletions

View File

@@ -1,9 +1,9 @@
# Change to production when ready to deploy in docker or iis # uncomment this out to run in productions
APP_ENV=dev # APP_ENV=production
# Gitea Info # Gitea Info
GITEA_URL=git.tuffraid.net GITEA_URL=git repo
GITEA_USERNAME=cowch GITEA_USERNAME=username
GITEA_REPO=logistics_support_tool GITEA_REPO=logistics_support_tool
GITEA_TOKEN=ad8eac91a01e3a1885a1dc10 GITEA_TOKEN=ad8eac91a01e3a1885a1dc10

View File

@@ -21,6 +21,7 @@ func main() {
// Set basePath dynamically // Set basePath dynamically
basePath := "/" basePath := "/"
if os.Getenv("APP_ENV") != "production" { if os.Getenv("APP_ENV") != "production" {
basePath = "/lst" // Dev only basePath = "/lst" // Dev only
} }
@@ -29,6 +30,10 @@ func main() {
fmt.Println("Welcome to lst backend where all the fun happens.") fmt.Println("Welcome to lst backend where all the fun happens.")
r := gin.Default() r := gin.Default()
if os.Getenv("APP_ENV") == "production" {
gin.SetMode(gin.ReleaseMode)
}
// // --- Add Redirects Here --- // // --- Add Redirects Here ---
// // Redirect root ("/") to "/app" or "/lst/app" // // Redirect root ("/") to "/app" or "/lst/app"
// r.GET("/", func(c *gin.Context) { // r.GET("/", func(c *gin.Context) {

View File

@@ -1,27 +1,15 @@
--- ---
services: services:
lst_backend: lst_backend:
# build: . # Tell Docker Compose to build the image using the Dockerfile in the current directory
build: build:
context: . context: .
dockerfile: ./backend/Dockerfile dockerfile: ./backend/Dockerfile
image: git.tuffraid.net/cowch/logistics_support_tool:backend-latest no_cache: true
container_name: lst_backend # A friendly name for your running container image: git.tuffraid.net/cowch/logistics_support_tool:latest
container_name: lst_backend
volumes: volumes:
- /path/to/backend/data:/data - /path/to/backend/data:/data
ports: ports:
- "8080:8080" - "8080:8080"
restart: unless-stopped restart: unless-stopped
pull_policy: never
lst_frontend:
# build: . # Tell Docker Compose to build the image using the Dockerfile in the current directory
build:
context: .
dockerfile: ./frontend/Dockerfile
image: git.tuffraid.net/cowch/logistics_support_tool:frontend-latest
container_name: lst_frontend # A friendly name for your running container
volumes:
- /path/to/frontend/data:/data
ports:
- "3120:3000"
restart: unless-stopped

View File

@@ -71,9 +71,9 @@ $tempStageDir = New-Item -ItemType Directory -Path (Join-Path $env:TEMP "lst_sta
# Copy files to organized structure # Copy files to organized structure
$filesToCopy = @( $filesToCopy = @(
@{ Source = "backend\lst_backend.exe"; Destination = "backend\lst_backend.exe" }, @{ Source = "backend\lst_backend.exe"; Destination = "app\lst_backend.exe" },
@{ Source = "backend\docs"; Destination = "backend\docs\" }, @{ Source = "backend\docs"; Destination = "app\docs\" },
@{ Source = "backend\frontend"; Destination = "backend\frontend\" }, @{ Source = "backend\frontend"; Destination = "app\frontend\" },
@{ Source = "LstWrapper\publish"; Destination = "lstwrapper\" }, @{ Source = "LstWrapper\publish"; Destination = "lstwrapper\" },
#@{ Source = "frontend\.nitro"; Destination = "frontend\.nitro" }, #@{ Source = "frontend\.nitro"; Destination = "frontend\.nitro" },
#@{ Source = "frontend\.tanstack"; Destination = "frontend\.tanstack" }, #@{ Source = "frontend\.tanstack"; Destination = "frontend\.tanstack" },

View File

@@ -1,10 +1,10 @@
Write-Host "Building the docker images for front and backend" Write-Host "Building the docker images for front and backend"
#docker build -t logistics_support_tool:frontend-latest -f ./frontend/Dockerfile --no-cache ./frontend #docker build -t logistics_support_tool:frontend-latest -f ./frontend/Dockerfile --no-cache ./frontend
docker build -t logistics_support_tool:backend-latest -f ./backend/Dockerfile --no-cache ./backend docker build -t logistics_support_tool:latest -f ./backend/Dockerfile --no-cache ./backend
Write-Host "Tagging the builds with latest this is for testing test basically." Write-Host "Tagging the builds with latest this is for testing test basically."
#docker tag logistics_support_tool:frontend-latest git.tuffraid.net/cowch/logistics_support_tool:frontend-latest #docker tag logistics_support_tool:frontend-latest git.tuffraid.net/cowch/logistics_support_tool:frontend-latest
docker tag logistics_support_tool:backend-latest git.tuffraid.net/cowch/logistics_support_tool:latest docker tag logistics_support_tool:latest git.tuffraid.net/cowch/logistics_support_tool:latest
# docker build -t logistics_support_tool:frontend-latest --no-cache . # docker build -t logistics_support_tool:frontend-latest --no-cache .
Write-Host "Push both builds to our gitea server." Write-Host "Push both builds to our gitea server."