3 Commits

Author SHA1 Message Date
Abdullah Atta
2bbb50e9f6 docker: use container images from dockerhub in docker compose 2024-07-31 13:16:19 +05:00
Abdullah Atta
d0a1a2ea9f docker: enable reflection for json serializing 2024-07-31 12:58:38 +05:00
Abdullah Atta
005dc4284d docker: publish with TrimMode set to partial 2024-07-31 12:17:22 +05:00
4 changed files with 25 additions and 27 deletions

View File

@@ -27,11 +27,13 @@ RUN dotnet build -c Release -o /app/build -a $TARGETARCH
FROM build AS publish
RUN dotnet publish -c Release -o /app/publish \
#--runtime alpine-x64 \
--self-contained true \
/p:PublishTrimmed=true \
/p:PublishSingleFile=true \
-a $TARGETARCH
#--runtime alpine-x64 \
--self-contained true \
/p:TrimMode=partial \
/p:PublishTrimmed=true \
/p:PublishSingleFile=true \
/p:JsonSerializerIsReflectionEnabledByDefault=true \
-a $TARGETARCH
FROM --platform=$BUILDPLATFORM base AS final
ARG TARGETARCH

View File

@@ -27,11 +27,13 @@ RUN dotnet build -c Release -o /app/build -a $TARGETARCH
FROM build AS publish
RUN dotnet publish -c Release -o /app/publish \
#--runtime alpine-x64 \
--self-contained true \
/p:PublishTrimmed=true \
/p:PublishSingleFile=true \
-a $TARGETARCH
#--runtime alpine-x64 \
--self-contained true \
/p:TrimMode=partial \
/p:PublishTrimmed=true \
/p:PublishSingleFile=true \
/p:JsonSerializerIsReflectionEnabledByDefault=true \
-a $TARGETARCH
FROM --platform=$BUILDPLATFORM base AS final
ARG TARGETARCH

View File

@@ -27,11 +27,13 @@ RUN dotnet build -c Release -o /app/build -a $TARGETARCH
FROM build AS publish
RUN dotnet publish -c Release -o /app/publish \
#--runtime alpine-x64 \
--self-contained true \
/p:PublishTrimmed=true \
/p:PublishSingleFile=true \
-a $TARGETARCH
#--runtime alpine-x64 \
--self-contained true \
/p:TrimMode=partial \
/p:PublishTrimmed=true \
/p:PublishSingleFile=true \
/p:JsonSerializerIsReflectionEnabledByDefault=true \
-a $TARGETARCH
FROM --platform=$BUILDPLATFORM base AS final
ARG TARGETARCH

View File

@@ -1,5 +1,3 @@
version: "3.4"
x-server-discovery: &server-discovery
NOTESNOOK_SERVER_PORT: 80
NOTESNOOK_SERVER_HOST: notesnook-server
@@ -72,9 +70,7 @@ services:
mc mb minio/$$S3_BUCKET_NAME -p
identity-server:
build:
context: .
dockerfile: ./Streetwriters.Identity/Dockerfile
image: streetwriters/identity:latest
ports:
- "8264:80"
networks:
@@ -94,9 +90,7 @@ services:
MONGODB_DATABASE_NAME: identity
notesnook-server:
build:
context: .
dockerfile: ./Notesnook.API/Dockerfile
image: streetwriters/notesnook-sync:latest
ports:
- "5264:80"
networks:
@@ -114,7 +108,7 @@ services:
start_period: 60s
environment:
<<: *server-discovery
MONGODB_CONNECTION_STRING: mongodb://notesnook-db:27017/notesnook?replSet=rs0
MONGODB_CONNECTION_STRING: mongodb://notesnook-db:27017/?replSet=rs0
MONGODB_DATABASE_NAME: notesnook
S3_INTERNAL_SERVICE_URL: "${S3_SERVICE_URL:-http://notesnook-s3:9000}"
S3_ACCESS_KEY_ID: "${S3_ACCESS_KEY_ID:-${MINIO_ROOT_USER:-minioadmin}}"
@@ -124,9 +118,7 @@ services:
S3_BUCKET_NAME: "${S3_BUCKET_NAME}"
sse-server:
build:
context: .
dockerfile: ./Streetwriters.Messenger/Dockerfile
image: streetwriters/sse:latest
ports:
- "7264:80"
env_file: *env-files