-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Alexander van Delft
committed
Jan 27, 2025
1 parent
d23fc7d
commit 2452462
Showing
11 changed files
with
146 additions
and
18 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
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
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,54 @@ | ||
# syntax=docker/dockerfile:1.4 | ||
|
||
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build-env | ||
WORKDIR /app | ||
COPY CDP4Authentication CDP4Authentication | ||
COPY CDP4DatabaseAuthentication CDP4DatabaseAuthentication | ||
COPY CDP4WspDatabaseAuthentication CDP4WspDatabaseAuthentication | ||
COPY CDP4Orm CDP4Orm | ||
COPY VersionFileCreator VersionFileCreator | ||
COPY CometServer CometServer | ||
|
||
RUN --mount=type=secret,id=SDK_PRE_RELEASE_NUGET_USERNAME --mount=type=secret,id=SDK_PRE_RELEASE_NUGET_PASSWORD SDK_PRE_RELEASE_NUGET_PASSWORD=$(cat /run/secrets/SDK_PRE_RELEASE_NUGET_PASSWORD) \ | ||
&& export SDK_PRE_RELEASE_NUGET_PASSWORD \ | ||
&& SDK_PRE_RELEASE_NUGET_USERNAME=$(cat /run/secrets/SDK_PRE_RELEASE_NUGET_USERNAME) \ | ||
&& export SDK_PRE_RELEASE_NUGET_USERNAME \ | ||
&& dotnet nuget add source https://nuget.pkg.github.com/STARIONGROUP/index.json --name github --username ${SDK_PRE_RELEASE_NUGET_USERNAME} --password ${SDK_PRE_RELEASE_NUGET_PASSWORD} --store-password-in-clear-text | ||
|
||
|
||
RUN dotnet build CDP4DatabaseAuthentication -c Release | ||
RUN dotnet build CDP4WspDatabaseAuthentication -c Release | ||
RUN dotnet publish -r linux-x64 CometServer -c Release -o /app/CometServer/bin/Release/publish | ||
|
||
FROM mcr.microsoft.com/dotnet/aspnet:9.0.1-alpine3.21 | ||
WORKDIR /app | ||
RUN mkdir /app/logs | ||
RUN mkdir /app/storage | ||
RUN mkdir /app/tempstorage | ||
RUN mkdir /app/upload | ||
|
||
RUN mkdir /app/Authentication/ | ||
RUN mkdir /app/Authentication/CDP4Database | ||
RUN mkdir /app/Authentication/CDP4WspDatabase | ||
RUN mkdir /app/VersionFileCreator | ||
|
||
COPY --from=build-env /app/CometServer/bin/Release/publish . | ||
RUN rm /app/appsettings.Development.json | ||
RUN mv /app/appsettings.Production.json /app/appsettings.json | ||
|
||
# COPY CDP4DatabaseAuthentication plugin | ||
COPY --from=build-env /app/CDP4DatabaseAuthentication/bin/Release/CDP4DatabaseAuthentication.dll /app/Authentication/CDP4Database/CDP4DatabaseAuthentication.dll | ||
COPY --from=build-env /app/CDP4DatabaseAuthentication/bin/Release/config.json /app/Authentication/CDP4Database/config.json | ||
|
||
# COPY CDP4WspDatabaseAuthentication plugin | ||
COPY --from=build-env /app/CDP4WspDatabaseAuthentication/bin/Release/CDP4WspDatabaseAuthentication.dll /app/Authentication/CDP4WspDatabase/CDP4WspDatabaseAuthentication.dll | ||
COPY --from=build-env /app/CDP4WspDatabaseAuthentication/bin/Release/config.json /app/Authentication/CDP4WspDatabase/config.json | ||
|
||
COPY --from=build-env /app/VersionFileCreator/bin/Release /app/VersionFileCreator | ||
RUN dotnet /app/VersionFileCreator/VersionFileCreator.dll path:/app | ||
RUN rm -r /app/VersionFileCreator | ||
|
||
# set to use the non-root USER here | ||
RUN chown -R $APP_UID /app | ||
USER $APP_UID | ||
CMD ["dotnet", "CometServer.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 |
---|---|---|
@@ -1,3 +1,10 @@ | ||
docker pull mcr.microsoft.com/dotnet/sdk:8.0 | ||
DOCKER_BUILDKIT=1 docker build -f Dockerfile -t stariongroup/comet-webservices-community-edition:8.0.0-rc39 . | ||
docker push stariongroup/comet-webservices-community-edition:8.0.0-rc39 | ||
docker pull mcr.microsoft.com/dotnet/sdk:9.0 | ||
DOCKER_BUILDKIT=1 docker build -f Dockerfile -t stariongroup/comet-webservices-community-edition:10.0.0-rc1 . | ||
docker push stariongroup/comet-webservices-community-edition:10.0.0-rc1 | ||
|
||
|
||
Pre-Release having a SDK pre release on GitHub: | ||
|
||
export SDK_PRE_RELEASE_NUGET_USERNAME=<GitHub username> | ||
export SDK_PRE_RELEASE_NUGET_PASSWORD=<GitHub token> | ||
DOCKER_BUILDKIT=1 docker build --secret id=SDK_PRE_RELEASE_NUGET_USERNAME,env=SDK_PRE_RELEASE_NUGET_USERNAME --secret id=SDK_PRE_RELEASE_NUGET_PASSWORD,env=SDK_PRE_RELEASE_NUGET_PASSWORD -f DockerfilePreRelease -t stariongroup/comet-webservices-community-edition:10.0.0-rc1 . |
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,67 @@ | ||
version: '3.8' | ||
services: | ||
|
||
comet_db: | ||
image: stariongroup/cdp4-test-database-community-edition:3.4.0 | ||
container_name: comet-db | ||
shm_size: 2gb | ||
restart: always | ||
command: postgres -c max_locks_per_transaction=1024 | ||
environment: | ||
- POSTGRES_USER=postgres | ||
- POSTGRES_PASSWORD=pass | ||
hostname: comet-db | ||
networks: | ||
comet: | ||
aliases: | ||
- comet-db | ||
ports: | ||
- '5432:5432' | ||
expose: | ||
- '5432' | ||
volumes: | ||
- comet-db-data:/var/lib/postgresql/data | ||
- comet-db-logs:/logs | ||
|
||
comet_webservices: | ||
image: stariongroup/comet-webservices-community-edition:10.0.0-rc1 | ||
container_name: comet-webservices | ||
shm_size: 512m | ||
restart: always | ||
hostname: comet-webservices | ||
networks: | ||
comet: | ||
aliases: | ||
- comet-webservices | ||
depends_on: | ||
- comet_db | ||
ports: | ||
- "5000:5000" | ||
expose: | ||
- '5000' | ||
volumes: | ||
- comet-ws-logs:/app/logs | ||
- comet-ws-storage:/app/storage | ||
- comet-ws-uplaod:/app/upload | ||
|
||
rabbitmq: | ||
image: "rabbitmq:3-management" | ||
container_name: rabbitmq | ||
restart: always | ||
ports: | ||
- 15672:15672 | ||
networks: | ||
- comet | ||
volumes: | ||
- 'rabbitmq_data:/data' | ||
|
||
networks: | ||
comet: | ||
|
||
volumes: | ||
comet-db-data: | ||
comet-db-logs: | ||
comet-ws-logs: | ||
comet-ws-storage: | ||
comet-ws-uplaod: | ||
rabbitmq_data: |
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