docker: publish Yavsc.Org / Api / Blogs artifacts to /app/publish
Add a 'dotnet publish' step at the end of both Dockerfiles so the runtime images (Dockerfile.runtime / .blogs / .api) can COPY the published output via --from=build-env. Before this commit, the Dockerfiles only ran 'dotnet build' and ended with CMD ["bash"] — i.e. they were pure build-env images with no consumable artifact for runtime use. Dockerfile publishes Yavsc.Org, Yavsc.Api and Yavsc.Blogs (used by docker-publish-android.yml which extracts the APK). Dockerfile.backend publishes Yavsc.Org only (used by docker-publish-backend.yml for the pazof/yavsc production image). Appsettings are NOT published: they are supplied at runtime via BuildKit --mount=type=secret (see Dockerfile.runtime in the next commits) or via a docker-compose volume.
This commit is contained in:
parent
c780ddfb07
commit
d068ff4061
2 changed files with 17 additions and 0 deletions
|
|
@ -38,5 +38,12 @@ COPY . .
|
|||
# 6. Compilation du serveur Web principal
|
||||
RUN dotnet build src/Yavsc.Org/Yavsc.Org.csproj -c Release --no-restore -clp:ErrorsOnly
|
||||
|
||||
# 7. Publication de l'artefact Yavsc.Org pour l'image runtime (Dockerfile.runtime).
|
||||
# Copie depuis /app/publish/Yavsc.Org/ via --from=build-env. Les appsettings
|
||||
# ne sont PAS publiés ici : fournis au runtime via BuildKit secret mount ou
|
||||
# volume docker-compose.
|
||||
RUN mkdir -p /app/publish
|
||||
RUN dotnet publish src/Yavsc.Org/Yavsc.Org.csproj -c Release --no-build -o /app/publish/Yavsc.Org
|
||||
|
||||
# Définition du répertoire d'exécution par défaut
|
||||
CMD ["bash"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue