From 1eb7965cf1fce5d5c4b6339906e58eb900bfb32c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20Liland=20Gjesdal?= Date: Wed, 9 Oct 2024 11:19:01 +0200 Subject: [PATCH 1/2] fix some warnings during docker image build --- Dockerfile | 2 +- Dockerfile.dist | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index e7420983a0f..26b07b099ba 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,7 +24,7 @@ ENV NODE_OPTIONS="--max_old_space_size=4096" # Listen / accept connections from all IP addresses. # NOTE: At this time it is only possible to run Docker container in Production mode # if you have a public URL. See https://github.com/DSpace/dspace-angular/issues/1485 -ENV NODE_ENV development +ENV NODE_ENV=development RUN apk add tzdata RUN yarn build:prod RUN npm install pm2 -g diff --git a/Dockerfile.dist b/Dockerfile.dist index 2a6a66fc063..de5b41ff64e 100644 --- a/Dockerfile.dist +++ b/Dockerfile.dist @@ -4,7 +4,7 @@ # Test build: # docker build -f Dockerfile.dist -t dspace/dspace-angular:dspace-7_x-dist . -FROM node:18-alpine as build +FROM node:18-alpine AS build # Ensure Python and other build tools are available # These are needed to install some node modules, especially on linux/arm64 @@ -26,6 +26,6 @@ COPY --chown=node:node docker/dspace-ui.json /app/dspace-ui.json WORKDIR /app USER node -ENV NODE_ENV production +ENV NODE_ENV=production EXPOSE 4000 -CMD pm2-runtime start dspace-ui.json --json +CMD ["pm2-runtime", "start", "dspace-ui.json", "--json"] From 55b7f05db8ee1ebfbf361c014a275706e9bec10e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20Liland=20Gjesdal?= Date: Wed, 9 Oct 2024 11:19:38 +0200 Subject: [PATCH 2/2] remove version from docker compose files (warning that it no longer is in use) --- docker/cli.assetstore.yml | 1 - docker/cli.ingest.yml | 1 - docker/cli.yml | 2 -- docker/db.entities.yml | 4 +--- docker/docker-compose-ci.yml | 1 - docker/docker-compose-dist.yml | 1 - docker/docker-compose-rest.yml | 1 - docker/docker-compose.yml | 1 - docker/matomo-w-db.yml | 2 -- 9 files changed, 1 insertion(+), 13 deletions(-) diff --git a/docker/cli.assetstore.yml b/docker/cli.assetstore.yml index a1d6377bfee..ef5cf95caf6 100644 --- a/docker/cli.assetstore.yml +++ b/docker/cli.assetstore.yml @@ -12,7 +12,6 @@ # https://github.com/DSpace/DSpace/blob/main/dspace/src/main/docker-compose/cli.assetstore.yml # # Therefore, it should be kept in sync with that file -version: "3.7" networks: dspacenet: diff --git a/docker/cli.ingest.yml b/docker/cli.ingest.yml index 1db241af3bf..2f812cde038 100644 --- a/docker/cli.ingest.yml +++ b/docker/cli.ingest.yml @@ -12,7 +12,6 @@ # https://github.com/DSpace/DSpace/blob/main/dspace/src/main/docker-compose/cli.ingest.yml # # Therefore, it should be kept in sync with that file -version: "3.7" services: dspace-cli: diff --git a/docker/cli.yml b/docker/cli.yml index cb0c7ecc30e..c370dc8e717 100644 --- a/docker/cli.yml +++ b/docker/cli.yml @@ -6,8 +6,6 @@ # http://www.dspace.org/license/ # -version: "3.7" - services: dspace-cli: image: "${DOCKER_OWNER:-ufal}/dspace-cli:${DSPACE_VER:-dspace-7_x}" diff --git a/docker/db.entities.yml b/docker/db.entities.yml index 6473bf2e385..d927af04df7 100644 --- a/docker/db.entities.yml +++ b/docker/db.entities.yml @@ -12,8 +12,6 @@ # https://github.com/DSpace/DSpace/blob/main/dspace/src/main/docker-compose/db.entities.yml # # # Therefore, it should be kept in sync with that file -version: "3.7" - services: dspacedb: image: dspace/dspace-postgres-pgcrypto:loadsql @@ -48,4 +46,4 @@ services: \ \ ' /dspace/config/item-submission.xml - catalina.sh run \ No newline at end of file + catalina.sh run diff --git a/docker/docker-compose-ci.yml b/docker/docker-compose-ci.yml index 9b2a29c1212..7a11e6e9668 100644 --- a/docker/docker-compose-ci.yml +++ b/docker/docker-compose-ci.yml @@ -10,7 +10,6 @@ # This is used by our GitHub CI at .github/workflows/build.yml # It is based heavily on the Backend's Docker Compose: # https://github.com/DSpace/DSpace/blob/main/docker-compose.yml -version: '3.7' networks: dspacenet: services: diff --git a/docker/docker-compose-dist.yml b/docker/docker-compose-dist.yml index 00225e8052a..1f4d2d7f5e6 100644 --- a/docker/docker-compose-dist.yml +++ b/docker/docker-compose-dist.yml @@ -8,7 +8,6 @@ # Docker Compose for running the DSpace Angular UI dist build # for previewing with the DSpace Demo site backend -version: '3.7' networks: dspacenet: services: diff --git a/docker/docker-compose-rest.yml b/docker/docker-compose-rest.yml index f2abaa9dd46..b22b7679779 100644 --- a/docker/docker-compose-rest.yml +++ b/docker/docker-compose-rest.yml @@ -10,7 +10,6 @@ # This is based heavily on the docker-compose.yml that is available in the DSpace/DSpace # (Backend) at: # https://github.com/DSpace/DSpace/blob/main/docker-compose.yml -version: '3.7' networks: dspacenet: # Due to the following specification, THIS FILE (docker-compose-rest.yml) must be last (if using several YMLs), diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 6293da2c4b8..49c83c9f88c 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -6,7 +6,6 @@ # http://www.dspace.org/license/ # -version: '3.7' networks: dspacenet: services: diff --git a/docker/matomo-w-db.yml b/docker/matomo-w-db.yml index ddacc7dbde4..1e7c23f6c94 100644 --- a/docker/matomo-w-db.yml +++ b/docker/matomo-w-db.yml @@ -1,5 +1,3 @@ -version: "3.5" - services: db: image: mariadb