-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Dockerfile and docker composer to project (#615)
* feat: initial docker file to webapi project * feat: try crete docker files * Fix Dockerfile * 🆙: update dockerfile to running correctly. * feat: adjustments on docker compose --------- Co-authored-by: Felipe Muniz <felipemuniznet@gmail.com> Co-authored-by: MarcusViniciusS <lowpoc.developer@gmail.com>
- Loading branch information
1 parent
8b1e5e2
commit bc8b086
Showing
6 changed files
with
135 additions
and
25 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,25 @@ | ||
**/.dockerignore | ||
**/.env | ||
**/.git | ||
**/.gitignore | ||
**/.project | ||
**/.settings | ||
**/.toolstarget | ||
**/.vs | ||
**/.vscode | ||
**/.idea | ||
**/*.*proj.user | ||
**/*.dbmdl | ||
**/*.jfm | ||
**/azds.yaml | ||
**/bin | ||
**/charts | ||
**/docker-compose* | ||
**/Dockerfile* | ||
**/node_modules | ||
**/npm-debug.log | ||
**/obj | ||
**/secrets.dev.yaml | ||
**/values.dev.yaml | ||
LICENSE | ||
README.md |
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,38 @@ | ||
# Use an official .NET 9 SDK as a parent image | ||
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build | ||
|
||
# Set the working directory to /app | ||
WORKDIR /app | ||
|
||
COPY data/. ./out/data | ||
|
||
# Copy the project files to the container | ||
COPY src/. . | ||
|
||
# Remove any bin or obj folders to ensure a clean build | ||
RUN find . -type d \( -name "bin" -o -name "obj" \) -exec rm -rf {} + | ||
|
||
# Restore dependencies | ||
RUN dotnet restore Standalone/NeoServer.Server.Standalone.csproj | ||
|
||
# Restore dependencies | ||
RUN dotnet restore out/data/extensions/NeoServer.Extensions.csproj | ||
|
||
# Build the project | ||
RUN dotnet publish Standalone/NeoServer.Server.Standalone.csproj -c Release -o out | ||
|
||
# Use an official .NET 9 runtime as a parent image | ||
FROM mcr.microsoft.com/dotnet/runtime:9.0 | ||
|
||
# Set the working directory to /app | ||
WORKDIR /app | ||
|
||
# Copy the published app to the container | ||
COPY --from=build /app/out . | ||
|
||
# Expose the ports that the server will listen on | ||
EXPOSE 7171 | ||
EXPOSE 7172 | ||
|
||
# Set the entrypoint to run the console app | ||
ENTRYPOINT ["dotnet", "NeoServer.Server.Standalone.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,25 @@ | ||
**/.dockerignore | ||
**/.env | ||
**/.git | ||
**/.gitignore | ||
**/.project | ||
**/.settings | ||
**/.toolstarget | ||
**/.vs | ||
**/.vscode | ||
**/.idea | ||
**/*.*proj.user | ||
**/*.dbmdl | ||
**/*.jfm | ||
**/azds.yaml | ||
**/bin | ||
**/charts | ||
**/docker-compose* | ||
**/Dockerfile* | ||
**/node_modules | ||
**/npm-debug.log | ||
**/obj | ||
**/secrets.dev.yaml | ||
**/values.dev.yaml | ||
LICENSE | ||
README.md |
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