File tree Expand file tree Collapse file tree 3 files changed +54
-0
lines changed Expand file tree Collapse file tree 3 files changed +54
-0
lines changed Original file line number Diff line number Diff line change 1+ # directories
2+ ** /bin /
3+ ** /obj /
4+ ** /out /
5+
6+ # files
7+ fly.toml
8+ Dockerfile *
9+ ** /* .md
Original file line number Diff line number Diff line change 1+ # Adjust DOTNET_OS_VERSION as desired
2+ ARG DOTNET_OS_VERSION="-alpine"
3+ ARG DOTNET_SDK_VERSION=9.0
4+
5+ FROM mcr.microsoft.com/dotnet/sdk:${DOTNET_SDK_VERSION}${DOTNET_OS_VERSION} AS build
6+ WORKDIR /src
7+
8+ # copy everything
9+ COPY . ./
10+ # restore as distinct layers
11+ RUN dotnet restore
12+ # build and publish a release
13+ RUN dotnet publish -c Release -o /app
14+
15+ # final stage/image
16+ FROM mcr.microsoft.com/dotnet/aspnet:${DOTNET_SDK_VERSION}
17+ ENV ASPNETCORE_URLS http://+:8080
18+ ENV ASPNETCORE_ENVIRONMENT Production
19+ EXPOSE 8080
20+ WORKDIR /app
21+ COPY --from=build /app .
22+ ENTRYPOINT [ "dotnet" , "AdminHubApi.dll" ]
Original file line number Diff line number Diff line change 1+ # fly.toml app configuration file generated for admin-hub-api on 2025-03-30T20:31:46Z
2+ #
3+ # See https://fly.io/docs/reference/configuration/ for information about how to use this file.
4+ #
5+
6+ app = ' admin-hub-api'
7+ primary_region = ' jnb'
8+
9+ [build ]
10+
11+ [http_service ]
12+ internal_port = 8080
13+ force_https = true
14+ auto_stop_machines = ' stop'
15+ auto_start_machines = true
16+ min_machines_running = 0
17+ processes = [' app' ]
18+
19+ [[vm ]]
20+ memory = ' 1gb'
21+ cpu_kind = ' shared'
22+ cpus = 1
23+ memory_mb = 1024
You can’t perform that action at this time.
0 commit comments