This commit is contained in:
2025-04-17 17:28:50 -04:00
parent d1c1dda688
commit df095a2266
3 changed files with 17 additions and 12 deletions

View File

@@ -128,14 +128,14 @@ jobs:
echo "## Do not edit this file directly. It is auto-generated by the script." > argocd/deployment/deployment.yml echo "## Do not edit this file directly. It is auto-generated by the script." > argocd/deployment/deployment.yml
sed "s|__TAG__|${{ gitea.ref_name }}|g" argocd/template/deployment.yml >> argocd/deployment/deployment.yml sed "s|__TAG__|${{ gitea.ref_name }}|g" argocd/template/deployment.yml >> argocd/deployment/deployment.yml
# - name: 💾✅ Commit Updated Manifest - name: 💾✅ Commit Updated Manifest
# uses: EndBug/add-and-commit@v9 uses: EndBug/add-and-commit@v9
# with: with:
# new_branch: ${{ gitea.ref_name }}-deploy new_branch: ${{ gitea.ref_name }}-deploy
# add: argocd/deployment/deployment.yml add: argocd/deployment/deployment.yml
# author_name: "GitHub Action 🤖" author_name: "GitHub Action 🤖"
# author_email: gitia@siteworxpro.com author_email: gitia@siteworxpro.com
# message: "📝🔄 Update deployment manifest with new image tags" message: "📝🔄 Update deployment manifest with new image tags"
- name: 🚀✨ Create Pull Request - name: 🚀✨ Create Pull Request
uses: peter-evans/create-pull-request@v7 uses: peter-evans/create-pull-request@v7

View File

@@ -16,10 +16,12 @@ import (
"github.com/labstack/echo/v4/middleware" "github.com/labstack/echo/v4/middleware"
"github.com/labstack/gommon/log" "github.com/labstack/gommon/log"
"net/http" "net/http"
"strings"
) )
const ( const (
Port Env.EnvironmentVariable = "PORT" Port Env.EnvironmentVariable = "PORT"
CorsOrigin Env.EnvironmentVariable = "CORS_ORIGIN"
) )
type ( type (
@@ -45,11 +47,14 @@ func main() {
e.Logger.SetLevel(log.DEBUG) e.Logger.SetLevel(log.DEBUG)
corsOriginS := CorsOrigin.GetEnvString("http://localhost:5173,http://127.0.0.1:5173")
corsOrigin := strings.Split(corsOriginS, ",")
e.Use(database.CreateDatabaseMiddleware()) e.Use(database.CreateDatabaseMiddleware())
e.Use(middleware.Recover()) e.Use(middleware.Recover())
e.Use(middleware.Logger()) e.Use(middleware.Logger())
e.Use(middleware.CORSWithConfig(middleware.CORSConfig{ e.Use(middleware.CORSWithConfig(middleware.CORSConfig{
AllowOrigins: []string{"http://localhost:5173", "http://127.0.0.1:5173"}, AllowOrigins: corsOrigin,
AllowMethods: []string{"GET", "POST", "PUT", "PATCH", "DELETE"}, AllowMethods: []string{"GET", "POST", "PUT", "PATCH", "DELETE"},
})) }))

View File

@@ -1,10 +1,10 @@
services: services:
frontend: frontend:
image: scr.siteworxpro.com/reloading-manager/frontend:v0.0.14 image: scr.siteworxpro.com/reloading-manager/frontend:v0.0.16
ports: ports:
- "80:80" - "80:80"
backend: backend:
image: scr.siteworxpro.com/reloading-manager/backend:v0.0.14 image: scr.siteworxpro.com/reloading-manager/backend:v0.0.16
environment: environment:
DB_HOST: 192.168.1.30 DB_HOST: 192.168.1.30
DB_DATABASE: loading DB_DATABASE: loading