Skip to content

Commit a36d2a6

Browse files
author
Fly.io
committed
New files from Fly.io Launch
1 parent bc2d4f1 commit a36d2a6

File tree

3 files changed

+54
-0
lines changed

3 files changed

+54
-0
lines changed

.dockerignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# directories
2+
**/bin/
3+
**/obj/
4+
**/out/
5+
6+
# files
7+
fly.toml
8+
Dockerfile*
9+
**/*.md

Dockerfile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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" ]

fly.toml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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

0 commit comments

Comments
 (0)