scipro/Dockerfile
Andreas Svanberg 323d6fc61e
All checks were successful
Build and test / build-and-test (push) Successful in 21m10s
Automate deployment of pull requests (#15)
Click link and see that system is working. Log in using the principal `admin@example.com`. Change something in the deployed system. Re-run the action. See that the database has reset.

**Major change** Added OAuth 2 login so no longer need modified web.xml with filter. Run `docker compose up` to start the local OAuth 2 authorization server to log in. Use the custom ticket form and enter the username you want to log in as in the "Principal" field.

Squashed all migrations since there are faulty ones that can't be applied to an empty database.

Reviewed-on: #15
Reviewed-by: Tom Zhao <tom.zhao@dsv.su.se>
Co-authored-by: Andreas Svanberg <andreass@dsv.su.se>
Co-committed-by: Andreas Svanberg <andreass@dsv.su.se>
2024-12-19 10:44:48 +01:00

40 lines
964 B
Docker

FROM debian:bookworm AS build
RUN apt-get update && apt-get install -y openjdk-17-jdk-headless
WORKDIR /app
COPY pom.xml .
COPY .mvn/ .mvn/
COPY mvnw .
COPY api/pom.xml api/pom.xml
COPY core/pom.xml core/pom.xml
COPY view/pom.xml view/pom.xml
COPY war/pom.xml war/pom.xml
COPY daisy-integration/pom.xml daisy-integration/pom.xml
# Download dependencies in a separate layer to allow caching for future builds
RUN ./mvnw dependency:go-offline \
--batch-mode \
--define includeScope=compile \
--activate-profiles docker-dependencies
COPY api/src/ api/src/
COPY core/src/ core/src/
COPY view/src/ view/src/
COPY war/src/ war/src/
COPY daisy-integration/src/ daisy-integration/src/
RUN ./mvnw package \
--offline \
--define skipTests \
--activate-profiles branch,DEV \
--define skip.npm \
--define skip.installnodenpm
FROM tomcat:10 AS run
COPY --from=build /app/war/target/*.war /usr/local/tomcat/webapps/ROOT.war
EXPOSE 8080