]> git.deb.at Git - rhonda/impostor.git/commitdiff
Dockerfile: install Http plugin in separate folder
authorminiduikboot <mini@duikbo.at>
Sun, 29 Jan 2023 21:58:30 +0000 (22:58 +0100)
committerminiduikboot <mini@duikbo.at>
Sun, 29 Jan 2023 21:58:30 +0000 (22:58 +0100)
Some people mount a folder on the plugin directory. This is fine, but
our sneaky Impostor.Http install method won't work here. So put it in a
different folder and prepend our folder to the plugin search path.

The number 76 has been randomly picked using dice

Dockerfile

index 34f9b04da064aa043d668a62c92a369a9db1895b..b38405a1ac0bb27d752e772ea42b54ae74597eac 100644 (file)
@@ -38,10 +38,14 @@ FROM --platform=$TARGETPLATFORM mcr.microsoft.com/dotnet/aspnet:7.0
 WORKDIR /app
 COPY --from=build /app ./
 
-# Add Impostor.Http as a default plugin
-ADD https://github.com/Impostor/Impostor.Http/releases/download/v0.4.0/Impostor.Http.dll /app/plugins/
-# Make it listen to 0.0.0.0 to expose it to the outside world. Override ASPNETCORE_URLS to stop warning.
-ENV IMPOSTOR_HTTP_HttpServer__ListenIp=0.0.0.0 ASPNETCORE_URLS=
+# Add Impostor.Http as a default built-in plugin
+ADD https://github.com/Impostor/Impostor.Http/releases/download/v0.4.0/Impostor.Http.dll /app/builtin-plugins/
+# Make it listen to 0.0.0.0 to expose it to the outside world.
+ENV IMPOSTOR_HTTP_HttpServer__ListenIp=0.0.0.0
+# Override ASPNETCORE_URLS to stop warning.
+ENV ASPNETCORE_URLS=
+# Enable the built-in plugin folder. Use a high number to prevent conflicts with existing configurations
+ENV IMPOSTOR_PluginLoader__Paths__76=/app/builtin-plugins
 
 EXPOSE 22000/tcp 22023/udp
 ENTRYPOINT ["./Impostor.Server"]