فهرست منبع

Build scripts and configuration for staging

Lukas Angerer 3 سال پیش
والد
کامیت
a921902570
7فایلهای تغییر یافته به همراه61 افزوده شده و 1 حذف شده
  1. 1 1
      .gitignore
  2. 11 0
      build.ps1
  3. 10 0
      config/app.prod.config.json
  4. 10 0
      config/app.staging.config.json
  5. 28 0
      docker-compose-local.yml
  6. 1 0
      push.ps1
  7. 0 0
      sandbox/data/.gitkeep

+ 1 - 1
.gitignore

@@ -451,6 +451,6 @@ $RECYCLE.BIN/
 ##
 ## Configs & Secrets
 ##
-auth_config.json
 /src/RunnersMeet.Server/data/
 /src/RunnersMeet.Server/wwwroot/
+/sandbox/data/

+ 11 - 0
build.ps1

@@ -0,0 +1,11 @@
+$ErrorActionPreference = "Inquire"
+
+$srcPath = (Join-Path $PSScriptRoot "src")
+
+Push-Location (Join-Path $srcPath "RunnersMeet.Client")
+ng build --configuration production
+Pop-Location
+
+Push-Location $srcPath
+docker build -t executry/runners-meet .
+Pop-Location

+ 10 - 0
config/app.prod.config.json

@@ -0,0 +1,10 @@
+{
+	"auth": {
+		"domain": "dev-2ls6voifhbt37usw.eu.auth0.com",
+		"clientId": "51IAWRARoNhevdmXODwxOb6xV2KEu1MO",
+		"audience": "https://runners.larcanum.net",
+		"appUri": "https://runners.larcanum.net",
+		"errorPath": "/error"
+	},
+	"apiUri": "https://runners.larcanum.net"
+}

+ 10 - 0
config/app.staging.config.json

@@ -0,0 +1,10 @@
+{
+	"auth": {
+		"domain": "dev-2ls6voifhbt37usw.eu.auth0.com",
+		"clientId": "51IAWRARoNhevdmXODwxOb6xV2KEu1MO",
+		"audience": "https://runners.larcanum.net",
+		"appUri": "https://localhost:7443",
+		"errorPath": "/error"
+	},
+	"apiUri": "https://localhost:7443"
+}

+ 28 - 0
docker-compose-local.yml

@@ -0,0 +1,28 @@
+version: "3"
+
+services:
+  runnersmeet:
+    image: executry/runners-meet
+    ports:
+      - 7443:443
+      - 7080:80
+    volumes:
+      - "./sandbox/https:/https:ro"
+      - "./sandbox/data:/app/data"
+      - "./config/app.staging.config.json:/app/wwwroot/assets/app.config.json"
+    environment:
+      - ASPNETCORE_ENVIRONMENT=Development
+      - ASPNETCORE_URLS=https://*:443;http://*:80
+      - ASPNETCORE_Kestrel__Certificates__Default__Password=localhost
+      - ASPNETCORE_Kestrel__Certificates__Default__Path=/https/localhost-self-signed.pfx
+      - ASPNETCORE_HTTPS_PORT=7443
+    deploy:
+      restart_policy:
+        condition: on-failure
+        delay: 5s
+        max_attempts: 3
+        window: 10s
+      resources:
+        limits:
+          cpus: "1"
+          memory: "2gb"

+ 1 - 0
push.ps1

@@ -0,0 +1 @@
+docker push executry/runners-meet:latest

+ 0 - 0
sandbox/data/.gitkeep