Compare commits
4 Commits
253d998b68
...
5a95bf3ef0
| Author | SHA1 | Date | |
|---|---|---|---|
| 5a95bf3ef0 | |||
| 7e9401d8bb | |||
| 0c4465c91a | |||
| 5f9d49561a |
@@ -1,9 +1,9 @@
|
||||
# Change to production when ready to deploy in docker or iis
|
||||
APP_ENV=dev
|
||||
# uncomment this out to run in productions
|
||||
# APP_ENV=production
|
||||
|
||||
# Gitea Info
|
||||
GITEA_URL=git.tuffraid.net
|
||||
GITEA_USERNAME=cowch
|
||||
GITEA_URL=git repo
|
||||
GITEA_USERNAME=username
|
||||
GITEA_REPO=logistics_support_tool
|
||||
GITEA_TOKEN=ad8eac91a01e3a1885a1dc10
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ func main() {
|
||||
|
||||
// Set basePath dynamically
|
||||
basePath := "/"
|
||||
|
||||
if os.Getenv("APP_ENV") != "production" {
|
||||
basePath = "/lst" // Dev only
|
||||
}
|
||||
@@ -29,6 +30,10 @@ func main() {
|
||||
fmt.Println("Welcome to lst backend where all the fun happens.")
|
||||
r := gin.Default()
|
||||
|
||||
if os.Getenv("APP_ENV") == "production" {
|
||||
gin.SetMode(gin.ReleaseMode)
|
||||
}
|
||||
|
||||
// // --- Add Redirects Here ---
|
||||
// // Redirect root ("/") to "/app" or "/lst/app"
|
||||
// r.GET("/", func(c *gin.Context) {
|
||||
|
||||
@@ -1,27 +1,15 @@
|
||||
---
|
||||
services:
|
||||
lst_backend:
|
||||
# build: . # Tell Docker Compose to build the image using the Dockerfile in the current directory
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./backend/Dockerfile
|
||||
image: git.tuffraid.net/cowch/logistics_support_tool:backend-latest
|
||||
container_name: lst_backend # A friendly name for your running container
|
||||
no_cache: true
|
||||
image: git.tuffraid.net/cowch/logistics_support_tool:latest
|
||||
container_name: lst_backend
|
||||
volumes:
|
||||
- /path/to/backend/data:/data
|
||||
ports:
|
||||
- "8080:8080"
|
||||
restart: unless-stopped
|
||||
|
||||
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
|
||||
pull_policy: never
|
||||
|
||||
@@ -71,9 +71,9 @@ $tempStageDir = New-Item -ItemType Directory -Path (Join-Path $env:TEMP "lst_sta
|
||||
|
||||
# Copy files to organized structure
|
||||
$filesToCopy = @(
|
||||
@{ Source = "backend\lst_backend.exe"; Destination = "backend\lst_backend.exe" },
|
||||
@{ Source = "backend\docs"; Destination = "backend\docs\" },
|
||||
@{ Source = "backend\frontend"; Destination = "backend\frontend\" },
|
||||
@{ Source = "backend\lst_backend.exe"; Destination = "app\lst_backend.exe" },
|
||||
@{ Source = "backend\docs"; Destination = "app\docs\" },
|
||||
@{ Source = "backend\frontend"; Destination = "app\frontend\" },
|
||||
@{ Source = "LstWrapper\publish"; Destination = "lstwrapper\" },
|
||||
#@{ Source = "frontend\.nitro"; Destination = "frontend\.nitro" },
|
||||
#@{ Source = "frontend\.tanstack"; Destination = "frontend\.tanstack" },
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
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: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."
|
||||
#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 .
|
||||
Write-Host "Push both builds to our gitea server."
|
||||
|
||||
Reference in New Issue
Block a user