Skip to content

Commit

Permalink
add backend as a release
Browse files Browse the repository at this point in the history
  • Loading branch information
lassemand committed Nov 6, 2024
1 parent caed5d8 commit 49b7c16
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
on:
push:
tags:
- ccdscan/*

jobs:
release-base-image:
uses: concordium/.github/.github/workflows/docker-release-workflow.yaml@main
with:
SERVICE_NAME: "ccdscan"
BUILD_ARGS: |
RUST_VERSION=1.74.1
GHC_VERSION=9.6.4
PROTOC_VERSION=3.15.3
FLATBUFFERS_TAG=v22.12.06
NVM_SH_VERSION=v0.37.2
CMAKE_VERSION=3.25.1
DOCKER_FILE_PATH: docker/base.Dockerfile
secrets: inherit
8 changes: 5 additions & 3 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
FROM mcr.microsoft.com/dotnet/aspnet:6.0-bookworm-slim AS base
ARG DOTNET_VERSION
FROM mcr.microsoft.com/dotnet/aspnet:${DOTNET_VERSION}-bookworm-slim AS base
WORKDIR /app
EXPOSE 5000

FROM mcr.microsoft.com/dotnet/sdk:6.0-bookworm-slim AS publish
FROM mcr.microsoft.com/dotnet/sdk:${DOTNET_VERSION}-bookworm-slim AS publish
RUN apt-get update && apt-get install -y build-essential
# Installing Rust to build Concordium.Sdk.
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain 1.80 --profile minimal -y
ENV PATH="/root/.cargo/bin:${PATH}"
WORKDIR /src
COPY . .
COPY ./backend .
RUN dotnet publish Application -c Release -o /app/publish

FROM base AS final
# Install 'ca-certificates' for supporting HTTPS.
RUN apt-get update && apt-get install ca-certificates && rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY --from=publish /app/publish .
LABEL dotnet_version=${DOTNET_VERSION}
ENV ASPNETCORE_URLS=http://+:5000
ENTRYPOINT ["dotnet", "Application.dll"]

0 comments on commit 49b7c16

Please sign in to comment.