File tree Expand file tree Collapse file tree 2 files changed +52
-0
lines changed
Expand file tree Collapse file tree 2 files changed +52
-0
lines changed Original file line number Diff line number Diff line change 1+ # - build project
2+ from mcr.microsoft.com/dotnet/sdk:7.0 as build
3+ workdir /TaleEngine
4+ copy . .
5+ run dotnet restore ".\T aleEngine\T aleEngine\T aleEngine.API.csproj" --disable-parallel
6+ run dotnet publish ".\T aleEngine\T aleEngine\T aleEngine.API.csproj" -c release -o /app --no-restore
7+
8+ # - apply migrations
9+ run dotnet tool install --global dotnet-ef --version 7.0.0
10+ ENV PATH="${PATH}:/root/.dotnet/tools"
11+ # run dotnet ef database update --project ".\TaleEngine\TaleEngine.Data\TaleEngine.Data.csproj"
12+
13+ # - serve env
14+ from mcr.microsoft.com/dotnet/aspnet:7.0
15+ workdir /app
16+ copy --from=build /app ./
17+
18+ expose 5000
19+
20+ entrypoint ["dotnet" , "TaleEngine.API.dll" ]
21+
22+ # - utils
23+
24+ # build image
25+ # docker build --rm -t dev/taleengine:latest .
26+
27+ # execute docker compose file
28+ # docker-compose build
29+
30+ # run container
31+ # docker run --rm -p 5000:5000 -p 5001:5001 -e ASPNETCORE_HTTP_PORT=https://+:5001 -e ASPNETCORE_URLS=http://+:5000 taleengine-api
32+ # http://localhost:5000/swagger/index.html
Original file line number Diff line number Diff line change 1+ version : " 3.4"
2+
3+ services :
4+ api :
5+ build :
6+ context : .
7+ dockerfile : Dockerfile
8+ ports :
9+ - " 8080:80"
10+ depends_on :
11+ - taleenginedb
12+
13+ taleenginedb :
14+ image : " mcr.microsoft.com/mssql/server:2022-latest"
15+ ports :
16+ - " 1433:1433"
17+
18+ environment :
19+ SA_PASSWORD : " "
20+ ACCEPT_EULA : " Y"
You can’t perform that action at this time.
0 commit comments