-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dockerfiles for auth/web, deployment scripts
- Loading branch information
Showing
6 changed files
with
93 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base | ||
RUN mkdir /repo && chown $APP_UID /repo | ||
USER $APP_UID | ||
WORKDIR /app | ||
EXPOSE 8080 | ||
EXPOSE 8081 | ||
|
||
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build | ||
ARG BUILD_CONFIGURATION=Release | ||
WORKDIR /src | ||
COPY ["SS14.Auth/SS14.Auth.csproj", "SS14.Auth/"] | ||
RUN dotnet restore "SS14.Auth/SS14.Auth.csproj" | ||
COPY . . | ||
WORKDIR "/src/SS14.Auth" | ||
RUN dotnet build "SS14.Auth.csproj" -c $BUILD_CONFIGURATION -o /app/build | ||
|
||
FROM build AS publish | ||
ARG BUILD_CONFIGURATION=Release | ||
RUN dotnet publish "SS14.Auth.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false | ||
|
||
FROM base AS final | ||
WORKDIR /app | ||
COPY --from=publish /app/publish . | ||
ENTRYPOINT ["dotnet", "SS14.Auth.dll"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
to_build=$1 | ||
|
||
if [ "$to_build" == hub ]; then | ||
docker build . -f hub.Dockerfile -t ss14_serverhub | ||
fi | ||
|
||
if [ "$to_build" == web ]; then | ||
docker build . -f web.Dockerfile -t ss14_web | ||
fi | ||
|
||
if [ "$to_build" == auth ]; then | ||
docker build . -f auth.Dockerfile -t ss14_auth | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
to_build=$1 | ||
|
||
if [ "$to_build" == hub ]; then | ||
docker image save ss14_serverhub | gzip | ssh pebbles podman load & | ||
docker image save ss14_serverhub | gzip | ssh nsh podman load & | ||
fi | ||
|
||
if [ "$to_build" == auth ]; then | ||
docker image save ss14_auth | gzip | ssh pebbles podman load & | ||
docker image save ss14_auth | gzip | ssh nsh podman load & | ||
fi | ||
|
||
if [ "$to_build" == web ]; then | ||
docker image save ss14_web | gzip | ssh pebbles podman load & | ||
docker image save ss14_web | gzip | ssh nsh podman load & | ||
fi | ||
|
||
wait $(jobs -p) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base | ||
RUN mkdir /repo && chown 1654 /repo | ||
USER 1654 | ||
WORKDIR /app | ||
EXPOSE 8080 | ||
EXPOSE 8081 | ||
|
||
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build | ||
ARG BUILD_CONFIGURATION=Release | ||
WORKDIR /src | ||
COPY ["SS14.Web/SS14.Web.csproj", "SS14.Web/"] | ||
RUN dotnet restore "SS14.Web/SS14.Web.csproj" | ||
COPY . . | ||
WORKDIR "/src/SS14.Web" | ||
RUN dotnet build "SS14.Web.csproj" -c $BUILD_CONFIGURATION -o /app/build | ||
|
||
FROM build AS publish | ||
ARG BUILD_CONFIGURATION=Release | ||
RUN dotnet publish "SS14.Web.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false | ||
|
||
FROM base AS final | ||
WORKDIR /app | ||
COPY --from=publish /app/publish . | ||
ENTRYPOINT ["dotnet", "SS14.Web.dll"] |