-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Hendrik Oenings
committed
Jun 18, 2024
0 parents
commit 047a275
Showing
5 changed files
with
64 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "masterportal"] | ||
path = masterportal | ||
url = https://bitbucket.org/geowerkstatt-hamburg/masterportal |
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,43 @@ | ||
# | ||
# Dockerfile for Masterportal v3 | ||
# | ||
|
||
# Pull dependencies. | ||
# This is separated from the build to improve caching | ||
FROM node:20-bullseye-slim AS build-environment | ||
ARG HTTP_PROXY | ||
ARG HTTPS_PROXY | ||
WORKDIR /opt/masterportal | ||
COPY masterportal/package.json masterportal/package-lock.json ./ | ||
ENV NODE_ENVIRONMENT development | ||
RUN npm config set proxy "${HTTP_PROXY}" | ||
RUN npm config set https-proxy "${HTTPS_PROXY}" | ||
RUN npm ci | ||
|
||
# Build Masterportal. | ||
# Only the necessary folders are copied to keep the image small | ||
# The basic portal is used for building only; include your own config via volume | ||
# We always use mastercode version "docker" to allow updates with no change to the portal | ||
FROM node:20-bullseye-slim AS build | ||
WORKDIR /opt/masterportal | ||
COPY --from=build-environment /opt/masterportal/node_modules node_modules | ||
COPY masterportal/package.json masterportal/package-lock.json ./ | ||
COPY masterportal/img img | ||
COPY masterportal/js js | ||
COPY masterportal/src_3_0_0 src_3_0_0 | ||
COPY masterportal/locales_3_0_0 locales_3_0_0 | ||
COPY masterportal/devtools devtools | ||
COPY lib/getMastercodeVersionFolderName.js devtools/tasks/getMastercodeVersionFolderName.js | ||
COPY masterportal/modules modules | ||
COPY masterportal/addons addons | ||
COPY masterportal/portal/basic portal/basic | ||
ENV NODE_ENVIRONMENT production | ||
RUN npm run buildPortal | ||
|
||
# Production image (exported). | ||
# This only needs a static webserver serving the masterportal | ||
FROM caddy:2 | ||
COPY --from=build /opt/masterportal/dist/mastercode /srv/www/mastercode | ||
|
||
EXPOSE 80/tcp | ||
CMD [ "caddy", "file-server", "--root", "/srv/www" ] |
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,16 @@ | ||
# Masterportal-Cloud | ||
|
||
This repository provides a Dockerfile for the [Masterportal](https://masterportal.org). | ||
|
||
## Building the docker image from source | ||
To build the docker image from source, you need to clone this repository and run `docker build`: | ||
|
||
```bash | ||
git clone --recurse-submodules https://github.com/Dataport/masterportal-cloud | ||
cd masterportal-cloud | ||
docker build -t masterportal . | ||
``` | ||
|
||
## Future plans | ||
|
||
- Provide a Helm chart for Kubernetes deployments |
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 @@ | ||
module.exports = () => 'docker' |
Submodule masterportal
added at
e0d85e