mirror of
https://github.com/DorkSquadRR/DorkNet.git
synced 2026-10-26 07:28:45 -07:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 05099cce91 | |||
| 97f6522497 | |||
| e3bbcbe4a4 |
@@ -53,12 +53,14 @@ WORKDIR /src
|
|||||||
# DorkNet.Models project ref, so its csproj needs to be present too.
|
# DorkNet.Models project ref, so its csproj needs to be present too.
|
||||||
COPY DorkNet.Server/DorkNet.Server.csproj DorkNet.Server/
|
COPY DorkNet.Server/DorkNet.Server.csproj DorkNet.Server/
|
||||||
COPY DorkNet.Models/DorkNet.Models.csproj DorkNet.Models/
|
COPY DorkNet.Models/DorkNet.Models.csproj DorkNet.Models/
|
||||||
|
COPY DorkNet.Contracts/DorkNet.Contracts.csproj DorkNet.Contracts/
|
||||||
RUN dotnet restore DorkNet.Server/DorkNet.Server.csproj
|
RUN dotnet restore DorkNet.Server/DorkNet.Server.csproj
|
||||||
|
|
||||||
# Now copy the rest of the .NET source, then drop the prebuilt admin
|
# Now copy the rest of the .NET source, then drop the prebuilt admin
|
||||||
# SPA into wwwroot/admin so the publish step ships it as static content.
|
# SPA into wwwroot/admin so the publish step ships it as static content.
|
||||||
COPY DorkNet.Server/ DorkNet.Server/
|
COPY DorkNet.Server/ DorkNet.Server/
|
||||||
COPY DorkNet.Models/ DorkNet.Models/
|
COPY DorkNet.Models/ DorkNet.Models/
|
||||||
|
COPY DorkNet.Contracts/ DorkNet.Contracts/
|
||||||
COPY --from=admin-ui /wwwroot/admin/ DorkNet.Server/wwwroot/admin/
|
COPY --from=admin-ui /wwwroot/admin/ DorkNet.Server/wwwroot/admin/
|
||||||
COPY --from=site /wwwroot/site/ DorkNet.Server/wwwroot/site/
|
COPY --from=site /wwwroot/site/ DorkNet.Server/wwwroot/site/
|
||||||
|
|
||||||
|
|||||||
@@ -167,6 +167,11 @@ public static class DorkNetRouteOwnership
|
|||||||
public static IReadOnlyList<string> PublicSubdomains =>
|
public static IReadOnlyList<string> PublicSubdomains =>
|
||||||
ServiceRouteGroups
|
ServiceRouteGroups
|
||||||
.SelectMany(group => group.HostSubdomains)
|
.SelectMany(group => group.HostSubdomains)
|
||||||
|
// api.* is a shared public host: it owns no service by host and is
|
||||||
|
// dispatched by path (see ResolvePublicService's path-prefix pass),
|
||||||
|
// so it never appears in a group's HostSubdomains. It must still be
|
||||||
|
// whitelisted here or HostFiltering rejects every api.{apex} request.
|
||||||
|
.Append("api")
|
||||||
.Append(AdminHost)
|
.Append(AdminHost)
|
||||||
.Append("feed")
|
.Append("feed")
|
||||||
.Distinct(StringComparer.OrdinalIgnoreCase)
|
.Distinct(StringComparer.OrdinalIgnoreCase)
|
||||||
|
|||||||
@@ -73,6 +73,7 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\DorkNet.Models\DorkNet.Models.csproj" />
|
<ProjectReference Include="..\DorkNet.Models\DorkNet.Models.csproj" />
|
||||||
|
<ProjectReference Include="..\DorkNet.Contracts\DorkNet.Contracts.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<!-- Service-slice containers reference DorkNet.Server for shared controllers
|
<!-- Service-slice containers reference DorkNet.Server for shared controllers
|
||||||
|
|||||||
@@ -17,8 +17,9 @@ x-dorknet-service-env: &dorknet-service-env
|
|||||||
|
|
||||||
x-dorknet-app-networks: &dorknet-app-networks
|
x-dorknet-app-networks: &dorknet-app-networks
|
||||||
networks:
|
networks:
|
||||||
|
# Internal only — backends are reached by the gateway over `default`,
|
||||||
|
# never directly by Traefik, so keep them off dokploy-network.
|
||||||
- default
|
- default
|
||||||
- dokploy-network
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
gateway:
|
gateway:
|
||||||
@@ -42,6 +43,18 @@ services:
|
|||||||
DorkNet__Services__Monolith: http://monolith:8080
|
DorkNet__Services__Monolith: http://monolith:8080
|
||||||
expose:
|
expose:
|
||||||
- "8080"
|
- "8080"
|
||||||
|
networks:
|
||||||
|
- default
|
||||||
|
- dokploy-network
|
||||||
|
labels:
|
||||||
|
# Cloudflare terminates TLS at the edge; the tunnel -> Traefik leg is
|
||||||
|
# internal HTTP, so route on the `web` entrypoint with no certresolver.
|
||||||
|
- traefik.enable=true
|
||||||
|
- traefik.docker.network=dokploy-network
|
||||||
|
# Scope routing to YOUR domain (apex + subdomains) instead of catch-all:
|
||||||
|
- traefik.http.routers.dorknet-gw.rule=Host(`${DORKNET_DOMAIN}`) || HostRegexp(`^.+\.${DORKNET_DOMAIN}$`)
|
||||||
|
- traefik.http.routers.dorknet-gw.entrypoints=web
|
||||||
|
- traefik.http.services.dorknet-gw.loadbalancer.server.port=8080
|
||||||
depends_on:
|
depends_on:
|
||||||
- identity
|
- identity
|
||||||
- rooms
|
- rooms
|
||||||
@@ -57,6 +70,10 @@ services:
|
|||||||
cloudflared:
|
cloudflared:
|
||||||
image: cloudflare/cloudflared:latest
|
image: cloudflare/cloudflared:latest
|
||||||
command: tunnel --no-autoupdate run --token ${CLOUDFLARE_TUNNEL_TOKEN:?Set CLOUDFLARE_TUNNEL_TOKEN in Dokploy}
|
command: tunnel --no-autoupdate run --token ${CLOUDFLARE_TUNNEL_TOKEN:?Set CLOUDFLARE_TUNNEL_TOKEN in Dokploy}
|
||||||
|
# Must share dokploy-network so the tunnel can reach the Traefik
|
||||||
|
# container (dokploy-traefik) by name and hand traffic off to it.
|
||||||
|
networks:
|
||||||
|
- dokploy-network
|
||||||
depends_on:
|
depends_on:
|
||||||
- gateway
|
- gateway
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|||||||
Reference in New Issue
Block a user