-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add docker-compose container for lp and oaipmh
- Loading branch information
Showing
5 changed files
with
108 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
FROM node:16 AS installer | ||
|
||
WORKDIR /frontend | ||
COPY package*.json /frontend/ | ||
RUN npm ci | ||
COPY . /frontend/ | ||
|
||
FROM node:16 AS builder | ||
WORKDIR /frontend | ||
COPY --from=installer /frontend /frontend | ||
|
||
RUN npx ng build | ||
|
||
FROM nginx:1.12-alpine | ||
RUN rm -rf /usr/share/nginx/html/* | ||
COPY --from=builder /frontend/dist/ /usr/share/nginx/html/ | ||
COPY scripts/nginx.conf /etc/nginx/nginx.conf | ||
EXPOSE 80 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
FROM node:16 AS installer | ||
|
||
RUN apt update && apt -y upgrade && \ | ||
apt install -y bash git | ||
|
||
# Prepare app directory | ||
WORKDIR /home/node/app | ||
COPY package*.json /home/node/app/ | ||
|
||
# set up local user to avoid running as root | ||
RUN chown -R node:node /home/node/app | ||
USER node | ||
|
||
# Install our packages | ||
RUN npm ci | ||
COPY --chown=node:node . /home/node/app/ | ||
|
||
# Build app | ||
FROM node:16 as builder | ||
|
||
ARG env=production | ||
WORKDIR /home/node/app | ||
COPY --from=installer /home/node/app /home/node/app | ||
|
||
RUN npx ng build --configuration=${env} | ||
|
||
FROM nginx:1.22.0-alpine | ||
|
||
RUN rm -rf /usr/share/nginx/html/* | ||
COPY --from=builder /home/node/app/dist /usr/share/nginx/html | ||
COPY nginx.conf /etc/nginx/nginx.conf | ||
|
||
EXPOSE 80 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
HOST_CONFIGURATION=server/host_config.json | ||
APP_ID=oai-pmh-service | ||
BASE_URL=http://localhost:3001 | ||
SCICAT_ROUTE=/oaipmh/oai | ||
LOG_LEVEL=debug | ||
REQUEST_LIMIT=100kb | ||
MASTER_ENV_FILE=oai-providerservice/.env | ||
DB_URL=mongodb/oaipmh | ||
DATABASE=oaipmh | ||
COLLECTION=PublishedData | ||
COLLECTION_ID=_id | ||
NAME=oai-mongo | ||
CONNECTOR=mongodb | ||
ADMIN_USER_EMAIL=[email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters