Commit 6b39a132 authored by Sonia Zorba's avatar Sonia Zorba
Browse files

Dockerfile changes

parent 2f085290
# IA2 GMS
## Database Docker image
## Docker images
To build the image run **from current directory**:
Docker images are available on [container registry page](https://www.ict.inaf.it/gitlab/ia2/ia2-gms/container_registry).
docker build -f database/Dockerfile --tag gms-db .
To start the image and use the database:
docker run -d -p 5432:5432 -i -t gms-db:latest
## GMS Docker image
To build the image:
mvn clean package dockerfile:build -DskipTests
To run:
docker run --env-file docker-env -d -p 8081:8081 -i -t gms:latest
A working demo using Docker Compose is available on [RAP repository](https://www.ict.inaf.it/gitlab/ia2/rap-ia2).
## Create the first super-admin
......
SPRING_DATASOURCE_URL=jdbc:postgresql://140.105.79.115:5432/postgres
SECURITY_OAUTH2_CLIENT_ACCESS-TOKEN-URI=http://140.105.79.115/rap-ia2/auth/oauth2/token
SECURITY_OAUTH2_CLIENT_USER-AUTHORIZATION-URI=http://localhost/rap-ia2/auth/oauth2/authorize
SECURITY_OAUTH2_RESOURCE_TOKEN-INFO-URI=http://140.105.79.115/rap-ia2/auth/oauth2/check_token
SECURITY_OAUTH2_RESOURCE_JWK_KEY-SET-URI=http://140.105.79.115/rap-ia2/auth/oidc/jwks
RAP_WS-URL=http://140.105.79.115/rap-ia2/ws
SPRING_PROFILES_ACTIVE=prod
FROM openjdk:8-jdk-alpine
VOLUME /tmp
ARG JAR_FILE
COPY target/${JAR_FILE} app.jar
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar"]
FROM node:15
ADD gms-ui/package*.json /gms-ui/
WORKDIR /gms-ui
RUN npx browserslist@latest --update-db
RUN npm ci
ADD gms-ui/src /gms-ui/src/
ADD gms-ui/public /gms-ui/public/
ADD gms-ui/*.js /gms-ui/
ADD gms-ui/*.json /gms-ui/
ADD gms-ui/.env.production /gms-ui/
RUN npm run build
FROM maven:3.6.3-openjdk-14
COPY --from=0 /gms-ui/dist/. /gms-ui/dist/
ADD gms/pom.xml /gms/pom.xml
ADD gms/src /gms/src/
WORKDIR /gms
RUN mvn clean package -DskipTests
FROM openjdk:14-jdk-alpine
COPY --from=1 /gms/target/gms.jar /gms.jar
ENTRYPOINT ["java","-jar","/gms.jar"]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment