From 3d47b4e44e8fe15eb22ca9fe4576e94f06cb7368 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Wed, 17 Sep 2025 00:57:24 +0800 Subject: [PATCH] :arrow_up: Save progress and say goodbye --- .env | 35 ++++ DysonNetwork.Control/AppHost.cs | 2 +- .../DysonNetwork.Control.csproj | 1 - compose.yaml | 86 -------- docker-compose.yaml | 194 ++++++++++++++++++ publish/settings/develop.json | 23 +++ publish/settings/drive.json | 127 ++++++++++++ publish/settings/pass.json | 82 ++++++++ publish/settings/ring.json | 47 +++++ publish/settings/sphere.json | 38 ++++ settings/develop.json | 7 +- settings/drive.json | 16 +- settings/pass.json | 12 +- settings/ring.json | 11 +- settings/sphere.json | 9 +- 15 files changed, 564 insertions(+), 126 deletions(-) create mode 100644 .env delete mode 100644 compose.yaml create mode 100644 docker-compose.yaml create mode 100644 publish/settings/develop.json create mode 100644 publish/settings/drive.json create mode 100644 publish/settings/pass.json create mode 100644 publish/settings/ring.json create mode 100644 publish/settings/sphere.json diff --git a/.env b/.env new file mode 100644 index 0000000..13c2b1d --- /dev/null +++ b/.env @@ -0,0 +1,35 @@ +# Default container port for ring +RING_PORT=8080 + +# Default container port for pass +PASS_PORT=8080 + +# Default container port for drive +DRIVE_PORT=8080 + +# Default container port for sphere +SPHERE_PORT=8080 + +# Default container port for develop +DEVELOP_PORT=8080 + +# Parameter cache-password +CACHE_PASSWORD=KS3jSPaU9e + +# Parameter queue-password +QUEUE_PASSWORD=8xEECa4ckz + +# Container image name for ring +RING_IMAGE=ring:latest + +# Container image name for pass +PASS_IMAGE=pass:latest + +# Container image name for drive +DRIVE_IMAGE=drive:latest + +# Container image name for sphere +SPHERE_IMAGE=sphere:latest + +# Container image name for develop +DEVELOP_IMAGE=develop:latest diff --git a/DysonNetwork.Control/AppHost.cs b/DysonNetwork.Control/AppHost.cs index 8c18814..7a64e5c 100644 --- a/DysonNetwork.Control/AppHost.cs +++ b/DysonNetwork.Control/AppHost.cs @@ -64,4 +64,4 @@ builder.AddYarp("gateway") builder.AddDockerComposeEnvironment("docker-compose"); -builder.Build().Run(); \ No newline at end of file +builder.Build().Run(); diff --git a/DysonNetwork.Control/DysonNetwork.Control.csproj b/DysonNetwork.Control/DysonNetwork.Control.csproj index f72833a..970a972 100644 --- a/DysonNetwork.Control/DysonNetwork.Control.csproj +++ b/DysonNetwork.Control/DysonNetwork.Control.csproj @@ -24,7 +24,6 @@ - diff --git a/compose.yaml b/compose.yaml deleted file mode 100644 index fee2329..0000000 --- a/compose.yaml +++ /dev/null @@ -1,86 +0,0 @@ -services: - etcd: - image: bitnami/etcd:latest - ports: - - "2379:2379" - - "2380:2380" - environment: - - ETCD_ADVERTISE_CLIENT_URLS=http://etcd:2379 - - ETCD_LISTEN_CLIENT_URLS=http://0.0.0.0:2379 - - ETCD_LISTEN_PEER_URLS=http://0.0.0.0:2380 - - ETCD_INITIAL_ADVERTISE_PEER_URLS=http://etcd:2380 - - ETCD_INITIAL_CLUSTER_TOKEN=etcd-cluster - - ETCD_INITIAL_CLUSTER_STATE=new - - ETCD_INITIAL_CLUSTER=etcd=http://etcd:2380 - healthcheck: - test: ["CMD", "etcdctl", "get", "/health"] - interval: 5s - timeout: 5s - retries: 5 - - gateway: - image: xsheep2010/dyson-gateway:latest - ports: - - "8000:8080" - environment: - - ConnectionStrings__Etcd=http://etcd:2379 - - Etcd__Insecure=true - - Service__Name=DysonNetwork.Gateway - - Service__Url=http://gateway:8080 - depends_on: - etcd: - condition: service_healthy - - drive: - image: xsheep2010/dyson-drive:latest - ports: - - "8001:8080" - environment: - - ConnectionStrings__Etcd=http://etcd:2379 - - Etcd__Insecure=true - - Service__Name=DysonNetwork.Drive - - Service__Url=http://drive:8080 - depends_on: - etcd: - condition: service_healthy - - pass: - image: xsheep2010/dyson-pass:latest - ports: - - "8002:8080" - environment: - - ConnectionStrings__Etcd=http://etcd:2379 - - Etcd__Insecure=true - - Service__Name=DysonNetwork.Pass - - Service__Url=http://pass:8080 - depends_on: - etcd: - condition: service_healthy - - ring: - image: xsheep2010/dyson-ring:latest - ports: - - "8003:8080" - environment: - - ConnectionStrings__Etcd=http://etcd:2379 - - Etcd__Insecure=true - - Service__Name=DysonNetwork.Ring - - Service__Url=http://ring:8080 - depends_on: - etcd: - condition: service_healthy - - sphere: - image: xsheep2010/dyson-sphere:latest - ports: - - "8004:8080" - environment: - - ConnectionStrings__Etcd=http://etcd:2379 - - Etcd__Insecure=true - - Service__Name=DysonNetwork.Sphere - - Service__Url=http://sphere:8080 - volumes: - - "./keys:/app/keys" - depends_on: - etcd: - condition: service_healthy \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..45745be --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,194 @@ +services: + aspire-dashboard: + image: "mcr.microsoft.com/dotnet/nightly/aspire-dashboard:latest" + expose: + - "18888" + - "18889" + networks: + - "aspire" + restart: "always" + cache: + image: "docker.io/library/redis:7.4" + command: + - "-c" + - "redis-server --requirepass $$REDIS_PASSWORD" + entrypoint: + - "/bin/sh" + environment: + REDIS_PASSWORD: "${CACHE_PASSWORD}" + expose: + - "6379" + networks: + - "aspire" + queue: + image: "docker.io/library/nats:2.11" + command: + - "--user" + - "nats" + - "--pass" + - "${QUEUE_PASSWORD}" + - "-js" + expose: + - "4222" + networks: + - "aspire" + ring: + image: "${RING_IMAGE}" + environment: + OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EXCEPTION_LOG_ATTRIBUTES: "true" + OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EVENT_LOG_ATTRIBUTES: "true" + OTEL_DOTNET_EXPERIMENTAL_OTLP_RETRY: "in_memory" + ASPNETCORE_FORWARDEDHEADERS_ENABLED: "true" + HTTP_PORTS: "${RING_PORT}" + ConnectionStrings__queue: "nats://nats:${QUEUE_PASSWORD}@queue:4222" + services__pass__http__0: "http://pass:${PASS_PORT}" + OTEL_EXPORTER_OTLP_ENDPOINT: "http://aspire:18889" + OTEL_EXPORTER_OTLP_PROTOCOL: "grpc" + OTEL_SERVICE_NAME: "ring" + volumes: + - "./Keys:/app/keys" + - "./settings/ring.json:/app/appsettings.json" + expose: + - "${RING_PORT}" + networks: + - "aspire" + pass: + image: "${PASS_IMAGE}" + environment: + OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EXCEPTION_LOG_ATTRIBUTES: "true" + OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EVENT_LOG_ATTRIBUTES: "true" + OTEL_DOTNET_EXPERIMENTAL_OTLP_RETRY: "in_memory" + ASPNETCORE_FORWARDEDHEADERS_ENABLED: "true" + HTTP_PORTS: "${PASS_PORT}" + ConnectionStrings__cache: "cache:6379,password=${CACHE_PASSWORD}" + ConnectionStrings__queue: "nats://nats:${QUEUE_PASSWORD}@queue:4222" + services__ring__http__0: "http://ring:${RING_PORT}" + OTEL_EXPORTER_OTLP_ENDPOINT: "http://aspire-dashboard:18889" + OTEL_EXPORTER_OTLP_PROTOCOL: "grpc" + OTEL_SERVICE_NAME: "pass" + volumes: + - "./Keys:/app/keys" + - "./settings/pass.json:/app/appsettings.json" + expose: + - "${PASS_PORT}" + networks: + - "aspire" + drive: + image: "${DRIVE_IMAGE}" + environment: + OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EXCEPTION_LOG_ATTRIBUTES: "true" + OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EVENT_LOG_ATTRIBUTES: "true" + OTEL_DOTNET_EXPERIMENTAL_OTLP_RETRY: "in_memory" + ASPNETCORE_FORWARDEDHEADERS_ENABLED: "true" + HTTP_PORTS: "${DRIVE_PORT}" + ConnectionStrings__cache: "cache:6379,password=${CACHE_PASSWORD}" + ConnectionStrings__queue: "nats://nats:${QUEUE_PASSWORD}@queue:4222" + services__pass__http__0: "http://pass:${PASS_PORT}" + services__ring__http__0: "http://ring:${RING_PORT}" + OTEL_EXPORTER_OTLP_ENDPOINT: "http://aspire-dashboard:18889" + OTEL_EXPORTER_OTLP_PROTOCOL: "grpc" + OTEL_SERVICE_NAME: "drive" + expose: + - "${DRIVE_PORT}" + volumes: + - "./settings/drive.json:/app/appsettings.json" + networks: + - "aspire" + sphere: + image: "${SPHERE_IMAGE}" + environment: + OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EXCEPTION_LOG_ATTRIBUTES: "true" + OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EVENT_LOG_ATTRIBUTES: "true" + OTEL_DOTNET_EXPERIMENTAL_OTLP_RETRY: "in_memory" + ASPNETCORE_FORWARDEDHEADERS_ENABLED: "true" + HTTP_PORTS: "${SPHERE_PORT}" + ConnectionStrings__cache: "cache:6379,password=${CACHE_PASSWORD}" + ConnectionStrings__queue: "nats://nats:${QUEUE_PASSWORD}@queue:4222" + services__pass__http__0: "http://pass:${PASS_PORT}" + services__ring__http__0: "http://ring:${RING_PORT}" + OTEL_EXPORTER_OTLP_ENDPOINT: "http://aspire-dashboard:18889" + OTEL_EXPORTER_OTLP_PROTOCOL: "grpc" + OTEL_SERVICE_NAME: "sphere" + volumes: + - "./Keys:/app/keys" + - "./settings/sphere.json:/app/appsettings.json" + expose: + - "${SPHERE_PORT}" + networks: + - "aspire" + develop: + image: "${DEVELOP_IMAGE}" + environment: + OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EXCEPTION_LOG_ATTRIBUTES: "true" + OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EVENT_LOG_ATTRIBUTES: "true" + OTEL_DOTNET_EXPERIMENTAL_OTLP_RETRY: "in_memory" + ASPNETCORE_FORWARDEDHEADERS_ENABLED: "true" + HTTP_PORTS: "${DEVELOP_PORT}" + ConnectionStrings__cache: "cache:6379,password=${CACHE_PASSWORD}" + services__pass__http__0: "http://pass:${PASS_PORT}" + services__ring__http__0: "http://ring:${RING_PORT}" + OTEL_EXPORTER_OTLP_ENDPOINT: "http://aspire-dashboard:18889" + OTEL_EXPORTER_OTLP_PROTOCOL: "grpc" + OTEL_SERVICE_NAME: "develop" + expose: + - "${DEVELOP_PORT}" + networks: + - "aspire" + gateway: + image: "mcr.microsoft.com/dotnet/nightly/yarp:2.3.0-preview.4" + command: + - "/app/yarp.dll" + entrypoint: + - "dotnet" + environment: + ASPNETCORE_ENVIRONMENT: "Production" + services__ring__http__0: "http://ring:${RING_PORT}" + REVERSEPROXY__ROUTES__route0__MATCH__PATH: "/ws" + REVERSEPROXY__ROUTES__route0__CLUSTERID: "cluster_ring" + REVERSEPROXY__ROUTES__route1__MATCH__PATH: "/ring/{**catch-all}" + REVERSEPROXY__ROUTES__route1__CLUSTERID: "cluster_ring" + REVERSEPROXY__ROUTES__route1__TRANSFORMS__0__PathRemovePrefix: "/ring" + REVERSEPROXY__ROUTES__route1__TRANSFORMS__1__PathPrefix: "/api" + REVERSEPROXY__ROUTES__route2__MATCH__PATH: "/.well-known/openid-configuration" + REVERSEPROXY__ROUTES__route2__CLUSTERID: "cluster_pass" + REVERSEPROXY__ROUTES__route3__MATCH__PATH: "/.well-known/jwks" + REVERSEPROXY__ROUTES__route3__CLUSTERID: "cluster_pass" + REVERSEPROXY__ROUTES__route4__MATCH__PATH: "/id/{**catch-all}" + REVERSEPROXY__ROUTES__route4__CLUSTERID: "cluster_pass" + REVERSEPROXY__ROUTES__route4__TRANSFORMS__0__PathRemovePrefix: "/id" + REVERSEPROXY__ROUTES__route4__TRANSFORMS__1__PathPrefix: "/api" + REVERSEPROXY__ROUTES__route5__MATCH__PATH: "/api/tus" + REVERSEPROXY__ROUTES__route5__CLUSTERID: "cluster_drive" + REVERSEPROXY__ROUTES__route6__MATCH__PATH: "/drive/{**catch-all}" + REVERSEPROXY__ROUTES__route6__CLUSTERID: "cluster_drive" + REVERSEPROXY__ROUTES__route6__TRANSFORMS__0__PathRemovePrefix: "/drive" + REVERSEPROXY__ROUTES__route6__TRANSFORMS__1__PathPrefix: "/api" + REVERSEPROXY__ROUTES__route7__MATCH__PATH: "/sphere/{**catch-all}" + REVERSEPROXY__ROUTES__route7__CLUSTERID: "cluster_sphere" + REVERSEPROXY__ROUTES__route7__TRANSFORMS__0__PathRemovePrefix: "/sphere" + REVERSEPROXY__ROUTES__route7__TRANSFORMS__1__PathPrefix: "/api" + REVERSEPROXY__ROUTES__route8__MATCH__PATH: "/develop/{**catch-all}" + REVERSEPROXY__ROUTES__route8__CLUSTERID: "cluster_develop" + REVERSEPROXY__ROUTES__route8__TRANSFORMS__0__PathRemovePrefix: "/develop" + REVERSEPROXY__ROUTES__route8__TRANSFORMS__1__PathPrefix: "/api" + REVERSEPROXY__CLUSTERS__cluster_ring__DESTINATIONS__destination1__ADDRESS: "http://_http.ring" + REVERSEPROXY__CLUSTERS__cluster_pass__DESTINATIONS__destination1__ADDRESS: "http://_http.pass" + REVERSEPROXY__CLUSTERS__cluster_drive__DESTINATIONS__destination1__ADDRESS: "http://_http.drive" + REVERSEPROXY__CLUSTERS__cluster_sphere__DESTINATIONS__destination1__ADDRESS: "http://_http.sphere" + REVERSEPROXY__CLUSTERS__cluster_develop__DESTINATIONS__destination1__ADDRESS: "http://_http.develop" + services__pass__http__0: "http://pass:${PASS_PORT}" + services__drive__http__0: "http://drive:${DRIVE_PORT}" + services__sphere__http__0: "http://sphere:${SPHERE_PORT}" + services__develop__http__0: "http://develop:${DEVELOP_PORT}" + OTEL_EXPORTER_OTLP_ENDPOINT: "http://aspire-dashboard:18889" + OTEL_EXPORTER_OTLP_PROTOCOL: "grpc" + OTEL_SERVICE_NAME: "gateway" + expose: + - "5000" + ports: + - "5001:5000" + networks: + - "aspire" +networks: + aspire: + driver: "bridge" diff --git a/publish/settings/develop.json b/publish/settings/develop.json new file mode 100644 index 0000000..a70297c --- /dev/null +++ b/publish/settings/develop.json @@ -0,0 +1,23 @@ +{ + "Debug": true, + "BaseUrl": "http://localhost:5071", + "SiteUrl": "https://solian.app", + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "AllowedHosts": "*", + "ConnectionStrings": { + "App": "Host=host.docker.internal;Port=5432;Database=dyson_network_dev;Username=postgres;Password=postgres;Include Error Detail=True;Maximum Pool Size=20;Connection Idle Lifetime=60" + }, + "KnownProxies": ["127.0.0.1", "::1"], + "Etcd": { + "Insecure": true + }, + "Service": { + "Name": "DysonNetwork.Develop", + "Url": "https://localhost:7192" + } +} diff --git a/publish/settings/drive.json b/publish/settings/drive.json new file mode 100644 index 0000000..b3bc501 --- /dev/null +++ b/publish/settings/drive.json @@ -0,0 +1,127 @@ +{ + "Debug": true, + "BaseUrl": "http://localhost:5090", + "GatewayUrl": "http://localhost:5094", + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "AllowedHosts": "*", + "ConnectionStrings": { + "App": "Host=host.docker.internal;Port=5432;Database=dyson_drive;Username=postgres;Password=postgres;Include Error Detail=True;Maximum Pool Size=20;Connection Idle Lifetime=60" + }, + "Authentication": { + "Schemes": { + "Bearer": { + "ValidAudiences": ["http://localhost:5071", "https://localhost:7099"], + "ValidIssuer": "solar-network" + } + } + }, + "AuthToken": { + "PublicKeyPath": "Keys/PublicKey.pem", + "PrivateKeyPath": "Keys/PrivateKey.pem" + }, + "OidcProvider": { + "IssuerUri": "https://nt.solian.app", + "PublicKeyPath": "Keys/PublicKey.pem", + "PrivateKeyPath": "Keys/PrivateKey.pem", + "AccessTokenLifetime": "01:00:00", + "RefreshTokenLifetime": "30.00:00:00", + "AuthorizationCodeLifetime": "00:30:00", + "RequireHttpsMetadata": true + }, + "Tus": { + "StorePath": "Uploads" + }, + "Storage": { + "PreferredRemote": "2adceae3-981a-4564-9b8d-5d71a211c873", + "Remote": [ + { + "Id": "minio", + "Label": "Minio", + "Region": "auto", + "Bucket": "solar-network-development", + "Endpoint": "localhost:9000", + "SecretId": "littlesheep", + "SecretKey": "password", + "EnabledSigned": true, + "EnableSsl": false + }, + { + "Id": "cloudflare", + "Label": "Cloudflare R2", + "Region": "auto", + "Bucket": "solar-network", + "Endpoint": "0a70a6d1b7128888c823359d0008f4e1.r2.cloudflarestorage.com", + "SecretId": "8ff5d06c7b1639829d60bc6838a542e6", + "SecretKey": "fd58158c5201be16d1872c9209d9cf199421dae3c2f9972f94b2305976580d67", + "EnableSigned": true, + "EnableSsl": true + } + ] + }, + "Captcha": { + "Provider": "cloudflare", + "ApiKey": "0x4AAAAAABCDUdOujj4feOb_", + "ApiSecret": "0x4AAAAAABCDUWABiJQweqlB7tYq-IqIm8U" + }, + "Notifications": { + "Topic": "dev.solsynth.solian", + "Endpoint": "http://localhost:8088" + }, + "Email": { + "Server": "smtp4dev.orb.local", + "Port": 25, + "UseSsl": false, + "Username": "no-reply@mail.solsynth.dev", + "Password": "password", + "FromAddress": "no-reply@mail.solsynth.dev", + "FromName": "Alphabot", + "SubjectPrefix": "Solar Network" + }, + "RealtimeChat": { + "Endpoint": "https://solar-network-im44o8gq.livekit.cloud", + "ApiKey": "APIs6TiL8wj3A4j", + "ApiSecret": "SffxRneIwTnlHPtEf3zicmmv3LUEl7xXael4PvWZrEhE" + }, + "GeoIp": { + "DatabasePath": "./Keys/GeoLite2-City.mmdb" + }, + "Oidc": { + "Google": { + "ClientId": "961776991058-963m1qin2vtp8fv693b5fdrab5hmpl89.apps.googleusercontent.com", + "ClientSecret": "" + }, + "Apple": { + "ClientId": "dev.solsynth.solian", + "TeamId": "W7HPZ53V6B", + "KeyId": "B668YP4KBG", + "PrivateKeyPath": "./Keys/Solarpass.p8" + }, + "Microsoft": { + "ClientId": "YOUR_MICROSOFT_CLIENT_ID", + "ClientSecret": "YOUR_MICROSOFT_CLIENT_SECRET", + "DiscoveryEndpoint": "YOUR_MICROSOFT_DISCOVERY_ENDPOINT" + } + }, + "Payment": { + "Auth": { + "Afdian": "" + }, + "Subscriptions": { + "Afdian": { + "7d17aae23c9611f0b5705254001e7c00": "solian.stellar.primary", + "7dfae4743c9611f0b3a55254001e7c00": "solian.stellar.nova", + "141713ee3d6211f085b352540025c377": "solian.stellar.supernova" + } + } + }, + "KnownProxies": ["127.0.0.1", "::1"], + "Service": { + "Name": "DysonNetwork.Drive", + "Url": "https://localhost:7092" + } +} diff --git a/publish/settings/pass.json b/publish/settings/pass.json new file mode 100644 index 0000000..dea5e59 --- /dev/null +++ b/publish/settings/pass.json @@ -0,0 +1,82 @@ +{ + "Debug": true, + "BaseUrl": "http://localhost:5216", + "SiteUrl": "https://id.solian.app", + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "AllowedHosts": "*", + "ConnectionStrings": { + "App": "Host=host.docker.internal;Port=5432;Database=dyson_pass;Username=postgres;Password=postgres;Include Error Detail=True;Maximum Pool Size=20;Connection Idle Lifetime=60" + }, + "Authentication": { + "Schemes": { + "Bearer": { + "ValidAudiences": ["http://localhost:5071", "https://localhost:7099"], + "ValidIssuer": "solar-network" + } + } + }, + "AuthToken": { + "CookieDomain": "localhost", + "PublicKeyPath": "Keys/PublicKey.pem", + "PrivateKeyPath": "Keys/PrivateKey.pem" + }, + "OidcProvider": { + "IssuerUri": "https://nt.solian.app", + "PublicKeyPath": "Keys/PublicKey.pem", + "PrivateKeyPath": "Keys/PrivateKey.pem", + "AccessTokenLifetime": "01:00:00", + "RefreshTokenLifetime": "30.00:00:00", + "AuthorizationCodeLifetime": "00:30:00", + "RequireHttpsMetadata": true + }, + "Captcha": { + "Provider": "cloudflare", + "ApiKey": "0x4AAAAAABCDUdOujj4feOb_", + "ApiSecret": "0x4AAAAAABCDUWABiJQweqlB7tYq-IqIm8U" + }, + "GeoIp": { + "DatabasePath": "./Keys/GeoLite2-City.mmdb" + }, + "Oidc": { + "Google": { + "ClientId": "961776991058-963m1qin2vtp8fv693b5fdrab5hmpl89.apps.googleusercontent.com", + "ClientSecret": "" + }, + "Apple": { + "ClientId": "dev.solsynth.solian", + "TeamId": "W7HPZ53V6B", + "KeyId": "B668YP4KBG", + "PrivateKeyPath": "./Keys/Solarpass.p8" + }, + "Microsoft": { + "ClientId": "YOUR_MICROSOFT_CLIENT_ID", + "ClientSecret": "YOUR_MICROSOFT_CLIENT_SECRET", + "DiscoveryEndpoint": "YOUR_MICROSOFT_DISCOVERY_ENDPOINT" + } + }, + "Payment": { + "Auth": { + "Afdian": "" + }, + "Subscriptions": { + "Afdian": { + "7d17aae23c9611f0b5705254001e7c00": "solian.stellar.primary", + "7dfae4743c9611f0b3a55254001e7c00": "solian.stellar.nova", + "141713ee3d6211f085b352540025c377": "solian.stellar.supernova" + } + } + }, + "KnownProxies": ["127.0.0.1", "::1"], + "Service": { + "Name": "DysonNetwork.Pass", + "Url": "https://localhost:7058" + }, + "Etcd": { + "Insecure": true + } +} diff --git a/publish/settings/ring.json b/publish/settings/ring.json new file mode 100644 index 0000000..3a15453 --- /dev/null +++ b/publish/settings/ring.json @@ -0,0 +1,47 @@ +{ + "Debug": true, + "BaseUrl": "http://localhost:5212", + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "AllowedHosts": "*", + "ConnectionStrings": { + "App": "Host=host.docker.internal;Port=5432;Database=dyson_pusher;Username=postgres;Password=postgres;Include Error Detail=True;Maximum Pool Size=20;Connection Idle Lifetime=60" + }, + "Notifications": { + "Push": { + "Production": true, + "Google": "./Keys/Solian.json", + "Apple": { + "PrivateKey": "./Keys/Solian.p8", + "PrivateKeyId": "4US4KSX4W6", + "TeamId": "W7HPZ53V6B", + "BundleIdentifier": "dev.solsynth.solian" + } + } + }, + "Email": { + "Server": "smtp4dev.orb.local", + "Port": 25, + "UseSsl": false, + "Username": "no-reply@mail.solsynth.dev", + "Password": "password", + "FromAddress": "no-reply@mail.solsynth.dev", + "FromName": "Alphabot", + "SubjectPrefix": "Solar Network" + }, + "GeoIp": { + "DatabasePath": "./Keys/GeoLite2-City.mmdb" + }, + "KnownProxies": ["127.0.0.1", "::1"], + "Service": { + "Name": "DysonNetwork.Ring", + "Url": "https://localhost:7259" + }, + "Etcd": { + "Insecure": true + } +} diff --git a/publish/settings/sphere.json b/publish/settings/sphere.json new file mode 100644 index 0000000..22a3a07 --- /dev/null +++ b/publish/settings/sphere.json @@ -0,0 +1,38 @@ +{ + "Debug": true, + "BaseUrl": "http://localhost:5071", + "SiteUrl": "https://solian.app", + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "AllowedHosts": "*", + "ConnectionStrings": { + "App": "Host=host.docker.internal;Port=5432;Database=dyson_network;Username=postgres;Password=postgres;Include Error Detail=True;Maximum Pool Size=20;Connection Idle Lifetime=60" + }, + "GeoIp": { + "DatabasePath": "./Keys/GeoLite2-City.mmdb" + }, + "RealtimeChat": { + "Endpoint": "https://solar-network-im44o8gq.livekit.cloud", + "ApiKey": "", + "ApiSecret": "" + }, + "Translation": { + "Provider": "Tencent", + "Region": "ap-hongkong", + "ProjectId": "0", + "SecretId": "", + "SecretKey": "" + }, + "KnownProxies": ["127.0.0.1", "::1"], + "Etcd": { + "Insecure": true + }, + "Service": { + "Name": "DysonNetwork.Sphere", + "Url": "https://localhost:7099" + } +} diff --git a/settings/develop.json b/settings/develop.json index b81e2d8..a70297c 100644 --- a/settings/develop.json +++ b/settings/develop.json @@ -10,12 +10,9 @@ }, "AllowedHosts": "*", "ConnectionStrings": { - "App": "Host=localhost;Port=5432;Database=dyson_network_dev;Username=postgres;Password=postgres;Include Error Detail=True;Maximum Pool Size=20;Connection Idle Lifetime=60" + "App": "Host=host.docker.internal;Port=5432;Database=dyson_network_dev;Username=postgres;Password=postgres;Include Error Detail=True;Maximum Pool Size=20;Connection Idle Lifetime=60" }, - "KnownProxies": [ - "127.0.0.1", - "::1" - ], + "KnownProxies": ["127.0.0.1", "::1"], "Etcd": { "Insecure": true }, diff --git a/settings/drive.json b/settings/drive.json index f025412..90c148c 100644 --- a/settings/drive.json +++ b/settings/drive.json @@ -10,22 +10,19 @@ }, "AllowedHosts": "*", "ConnectionStrings": { - "App": "Host=localhost;Port=5432;Database=dyson_drive;Username=postgres;Password=postgres;Include Error Detail=True;Maximum Pool Size=20;Connection Idle Lifetime=60" + "App": "Host=host.docker.internal;Port=5432;Database=dyson_drive;Username=postgres;Password=postgres;Include Error Detail=True;Maximum Pool Size=20;Connection Idle Lifetime=60" }, "Authentication": { "Schemes": { "Bearer": { - "ValidAudiences": [ - "http://localhost:5071", - "https://localhost:7099" - ], + "ValidAudiences": ["http://localhost:5071", "https://localhost:7099"], "ValidIssuer": "solar-network" } } }, "AuthToken": { - "PublicKeyPath": "Keys/PublicKey.pem", - "PrivateKeyPath": "Keys/PrivateKey.pem" + "PublicKeyPath": "app/keys/PublicKey.pem", + "PrivateKeyPath": "app/keys/PrivateKey.pem" }, "OidcProvider": { "IssuerUri": "https://nt.solian.app", @@ -122,10 +119,7 @@ } } }, - "KnownProxies": [ - "127.0.0.1", - "::1" - ], + "KnownProxies": ["127.0.0.1", "::1"], "Service": { "Name": "DysonNetwork.Drive", "Url": "https://localhost:7092" diff --git a/settings/pass.json b/settings/pass.json index 066d1a3..dea5e59 100644 --- a/settings/pass.json +++ b/settings/pass.json @@ -10,15 +10,12 @@ }, "AllowedHosts": "*", "ConnectionStrings": { - "App": "Host=localhost;Port=5432;Database=dyson_pass;Username=postgres;Password=postgres;Include Error Detail=True;Maximum Pool Size=20;Connection Idle Lifetime=60" + "App": "Host=host.docker.internal;Port=5432;Database=dyson_pass;Username=postgres;Password=postgres;Include Error Detail=True;Maximum Pool Size=20;Connection Idle Lifetime=60" }, "Authentication": { "Schemes": { "Bearer": { - "ValidAudiences": [ - "http://localhost:5071", - "https://localhost:7099" - ], + "ValidAudiences": ["http://localhost:5071", "https://localhost:7099"], "ValidIssuer": "solar-network" } } @@ -74,10 +71,7 @@ } } }, - "KnownProxies": [ - "127.0.0.1", - "::1" - ], + "KnownProxies": ["127.0.0.1", "::1"], "Service": { "Name": "DysonNetwork.Pass", "Url": "https://localhost:7058" diff --git a/settings/ring.json b/settings/ring.json index 2ab4e9e..58332b9 100644 --- a/settings/ring.json +++ b/settings/ring.json @@ -9,12 +9,12 @@ }, "AllowedHosts": "*", "ConnectionStrings": { - "App": "Host=localhost;Port=5432;Database=dyson_pusher;Username=postgres;Password=postgres;Include Error Detail=True;Maximum Pool Size=20;Connection Idle Lifetime=60" + "App": "Host=host.docker.internal;Port=5432;Database=dyson_pusher;Username=postgres;Password=postgres;Include Error Detail=True;Maximum Pool Size=20;Connection Idle Lifetime=60" }, "Notifications": { "Push": { "Production": true, - "Google": "./Keys/Solian.json", + "Google": "/app/keys/Solian.json", "Apple": { "PrivateKey": "./Keys/Solian.p8", "PrivateKeyId": "4US4KSX4W6", @@ -34,12 +34,9 @@ "SubjectPrefix": "Solar Network" }, "GeoIp": { - "DatabasePath": "./Keys/GeoLite2-City.mmdb" + "DatabasePath": "/app/keys/GeoLite2-City.mmdb" }, - "KnownProxies": [ - "127.0.0.1", - "::1" - ], + "KnownProxies": ["127.0.0.1", "::1"], "Service": { "Name": "DysonNetwork.Ring", "Url": "https://localhost:7259" diff --git a/settings/sphere.json b/settings/sphere.json index 1157d91..18055c5 100644 --- a/settings/sphere.json +++ b/settings/sphere.json @@ -10,10 +10,10 @@ }, "AllowedHosts": "*", "ConnectionStrings": { - "App": "Host=localhost;Port=5432;Database=dyson_network;Username=postgres;Password=postgres;Include Error Detail=True;Maximum Pool Size=20;Connection Idle Lifetime=60" + "App": "Host=host.docker.internal;Port=5432;Database=dyson_network;Username=postgres;Password=postgres;Include Error Detail=True;Maximum Pool Size=20;Connection Idle Lifetime=60" }, "GeoIp": { - "DatabasePath": "./Keys/GeoLite2-City.mmdb" + "DatabasePath": "/app/keys/GeoLite2-City.mmdb" }, "RealtimeChat": { "Endpoint": "https://solar-network-im44o8gq.livekit.cloud", @@ -27,10 +27,7 @@ "SecretId": "", "SecretKey": "" }, - "KnownProxies": [ - "127.0.0.1", - "::1" - ], + "KnownProxies": ["127.0.0.1", "::1"], "Etcd": { "Insecure": true },