diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 3de2465..9ab1271 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -131,7 +131,8 @@ jobs: - name: 📝🔧 Update Deployment Manifest run: | - sed "s|__TAG__|${{ gitea.ref_name }}|g" argocd/template/deployment.yml > argocd/deployment/deployment.yml + echo "## Do not edit this file directly. It is auto-generated by the script.\n\n" > argocd/deployment/deployment.yml + sed "s|__TAG__|${{ gitea.ref_name }}|g" argocd/template/deployment.yml >> argocd/deployment/deployment.yml - name: 💾✅ Commit Updated Manifest uses: EndBug/add-and-commit@v9 diff --git a/argocd/deployment/configmap.yml b/argocd/deployment/configmap.yml new file mode 100644 index 0000000..69293d2 --- /dev/null +++ b/argocd/deployment/configmap.yml @@ -0,0 +1,10 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: reloading-cm + namespace: reloading +data: + DB_HOST: "192.168.1.30" + DB_DATABASE: "loading" + DB_USERNAME: "loading" + DB_PASSWORD: "loading" \ No newline at end of file diff --git a/argocd/deployment/deployment.yml b/argocd/deployment/deployment.yml index a8857dc..810ba25 100644 --- a/argocd/deployment/deployment.yml +++ b/argocd/deployment/deployment.yml @@ -1,3 +1,4 @@ +## Do not edit this file directly. It is auto-generated by the script. apiVersion: apps/v1 kind: Deployment metadata: diff --git a/argocd/template/deployment.yml b/argocd/template/deployment.yml index 5a578b5..6a6b6be 100644 --- a/argocd/template/deployment.yml +++ b/argocd/template/deployment.yml @@ -22,3 +22,6 @@ spec: image: scr.siteworxpro.com/reloading-manager/backend:__TAG__ ports: - containerPort: 8080 + envFrom: + - configMapRef: + name: reloading-cm diff --git a/backend/database/conn.go b/backend/database/conn.go index 72172bc..905584b 100644 --- a/backend/database/conn.go +++ b/backend/database/conn.go @@ -37,7 +37,7 @@ func (*Database) DSN() string { dbUser := DbUser.GetEnvString("postgres") dbPassword := DbPassword.GetEnvString("password") - extraParams := "?sslmode=disable" + extraParams := "?sslmode=prefer" return fmt.Sprintf("postgres://%s:%s@%s:5432/%s%s", dbUser, dbPassword, dbHost, dbDatabase, extraParams) } diff --git a/docker-compose.yml b/docker-compose.yml index e69de29..0ef0f8b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -0,0 +1,14 @@ +services: + frontend: + image: scr.siteworxpro.com/reloading-manager/frontend:v0.0.9 + ports: + - "80:80" + backend: + image: scr.siteworxpro.com/reloading-manager/backend:v0.0.9 + environment: + DB_HOST: 192.168.1.30 + DB_DATABASE: loading + DB_USERNAME: loading + DB_PASSWORD: loading + ports: + - "8080:8080"