forked from shinolabs/PinkSea
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.Gateway
More file actions
31 lines (23 loc) · 761 Bytes
/
Dockerfile.Gateway
File metadata and controls
31 lines (23 loc) · 761 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
FROM node:alpine AS frontend-build-env
WORKDIR /App
COPY ./PinkSea.Frontend/ ./
RUN npm install
RUN npm run build; exit 0
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build-env
WORKDIR /App
# Copy everything
COPY ./PinkSea.Gateway/. ./
# Restore as distinct layers
RUN dotnet restore
# Build and publish a release
RUN dotnet publish -c Release -o out
# Build runtime image
FROM mcr.microsoft.com/dotnet/aspnet:8.0
WORKDIR /App
COPY --from=build-env /App/out .
RUN mkdir wwwroot
COPY --from=frontend-build-env /App/dist ./wwwroot/
RUN apt-get update && apt-get install -y curl
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
CMD curl --fail http://localhost:8080/xrpc/_health || exit 1
ENTRYPOINT ["dotnet", "PinkSea.Gateway.dll"]