* build(deps): bump org.jacoco:jacoco-maven-plugin in /server Bumps [org.jacoco:jacoco-maven-plugin](https://github.com/jacoco/jacoco) from 0.8.13 to 0.8.14. - [Release notes](https://github.com/jacoco/jacoco/releases) - [Commits](https://github.com/jacoco/jacoco/compare/v0.8.13...v0.8.14) --- updated-dependencies: - dependency-name: org.jacoco:jacoco-maven-plugin dependency-version: 0.8.14 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * fix: client/Dockerfile to reduce vulnerabilities The following vulnerabilities are fixed with an upgrade: - https://snyk.io/vuln/SNYK-ALPINE320-OPENSSL-13174134 - https://snyk.io/vuln/SNYK-ALPINE320-OPENSSL-13174135 - https://snyk.io/vuln/SNYK-ALPINE320-OPENSSL-13174135 - https://snyk.io/vuln/SNYK-ALPINE320-OPENSSL-13174136 - https://snyk.io/vuln/SNYK-ALPINE320-OPENSSL-13174136 * build(deps): bump actions/setup-node from 5 to 6 Bumps [actions/setup-node](https://github.com/actions/setup-node) from 5 to 6. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/v5...v6) --- updated-dependencies: - dependency-name: actions/setup-node dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * fix: server/Dockerfile to reduce vulnerabilities The following vulnerabilities are fixed with an upgrade: - https://snyk.io/vuln/SNYK-DEBIAN12-PERL-5489190 - https://snyk.io/vuln/SNYK-DEBIAN12-ZLIB-6008963 - https://snyk.io/vuln/SNYK-DEBIAN12-PAM-10378969 - https://snyk.io/vuln/SNYK-DEBIAN12-PAM-10378969 - https://snyk.io/vuln/SNYK-DEBIAN12-PAM-10378969 * build(deps): bump org.springframework.boot:spring-boot-starter-parent Bumps [org.springframework.boot:spring-boot-starter-parent](https://github.com/spring-projects/spring-boot) from 3.5.6 to 3.5.7. - [Release notes](https://github.com/spring-projects/spring-boot/releases) - [Commits](https://github.com/spring-projects/spring-boot/compare/v3.5.6...v3.5.7) --- updated-dependencies: - dependency-name: org.springframework.boot:spring-boot-starter-parent dependency-version: 3.5.7 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * build(deps): bump com.puppycrawl.tools:checkstyle in /server Bumps [com.puppycrawl.tools:checkstyle](https://github.com/checkstyle/checkstyle) from 11.1.0 to 12.1.1. - [Release notes](https://github.com/checkstyle/checkstyle/releases) - [Commits](https://github.com/checkstyle/checkstyle/compare/checkstyle-11.1.0...checkstyle-12.1.1) --- updated-dependencies: - dependency-name: com.puppycrawl.tools:checkstyle dependency-version: 12.1.1 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * build(deps): bump org.hibernate.orm.tooling:hibernate-enhance-maven-plugin Bumps [org.hibernate.orm.tooling:hibernate-enhance-maven-plugin](https://github.com/hibernate/hibernate-orm) from 6.6.31.Final to 6.6.34.Final. - [Release notes](https://github.com/hibernate/hibernate-orm/releases) - [Changelog](https://github.com/hibernate/hibernate-orm/blob/6.6.34/changelog.txt) - [Commits](https://github.com/hibernate/hibernate-orm/compare/6.6.31...6.6.34) --- updated-dependencies: - dependency-name: org.hibernate.orm.tooling:hibernate-enhance-maven-plugin dependency-version: 6.6.34.Final dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * chore: bump dependencies and fix tests --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: snyk-bot <snyk-bot@snyk.io>
43 lines
1.3 KiB
Docker
43 lines
1.3 KiB
Docker
# Build static files
|
|
# Node Bullseye has npm
|
|
FROM node:22.14-bookworm-slim AS build
|
|
ENV NODE_OPTIONS="--max-old-space-size=3072"
|
|
|
|
# Build
|
|
WORKDIR /app
|
|
COPY *.html *.json *.ts ./
|
|
COPY ./src ./src
|
|
COPY ./public ./public
|
|
RUN npm ci --ignore-scripts --no-update-notifier --omit=dev && \
|
|
npm run build && \
|
|
rm -rf node_modules
|
|
|
|
# Deploy container
|
|
# Caddy serves static files
|
|
FROM caddy:2.10.2-alpine
|
|
RUN apk add --no-cache ca-certificates curl
|
|
|
|
# Receive build number as argument, retain as environment variable
|
|
ARG VITE_BUILD
|
|
ARG SOURCE_PR
|
|
ENV VITE_BUILD=${VITE_BUILD}
|
|
ENV SOURCE_PR=${SOURCE_PR}
|
|
|
|
# Add metadata to the final image
|
|
LABEL org.opencontainers.image.authors="Ricardo Campos <ricardompcampos@gmail.com>" \
|
|
org.opencontainers.image.vendor="Ricardo Campos Org" \
|
|
org.opencontainers.image.title="TaskNoteApp client" \
|
|
org.opencontainers.image.description="React Web app application" \
|
|
org.opencontainers.image.version="${SOURCE_PR}" \
|
|
org.opencontainers.image.source="https://github.com/ricardo-campos-org/react-typescript-todolist"
|
|
|
|
# Copy files and run formatting
|
|
COPY --from=build /app/dist/ /app/dist
|
|
COPY Caddyfile /etc/caddy/Caddyfile
|
|
RUN caddy fmt --overwrite /etc/caddy/Caddyfile
|
|
|
|
# User, port and healthcheck
|
|
EXPOSE 5000
|
|
HEALTHCHECK CMD curl -f http://localhost:5000
|
|
USER 1001
|