Skip to content
Snippets Groups Projects
Commit 51267d39 authored by Sebastien DUMETZ's avatar Sebastien DUMETZ
Browse files

add back package.json from source. Add back docker build files

parent 1c791078
No related branches found
No related tags found
No related merge requests found
/files/
/source/voyager/docs/
**/dist/
**/node_modules/
**/.git/
*.tar.gz
FROM node:16-alpine as build
RUN mkdir -p /app/dist /app/source
WORKDIR /app
COPY source/server/package*.json /app/source/server/
RUN (cd /app/source/server && npm ci)
COPY source/voyager/package*.json /app/source/voyager/
RUN (cd /app/source/voyager && npm ci)
COPY source/ui/package*.json /app/source/ui/
RUN (cd /app/source/ui && npm ci)
COPY ./package*.json /app/
RUN npm ci
COPY source/server /app/source/server
RUN npm run build-server
# outputs files in /app/source/server/dist
COPY source/voyager /app/source/voyager
RUN npm run build-voyager
# files are automatically picked up by build-ui
COPY source/ui /app/source/ui
RUN npm run build-ui
# outputs files in /app/dist
###################
# The actual container to be published
###################
FROM node:16-alpine
LABEL org.opencontainers.image.source=https://github.com/Holusion/e-thesaurus
LABEL org.opencontainers.image.description="eCorpus base image"
LABEL org.opencontainers.image.licenses=Apache
ARG PORT=8000
ENV PUBLIC=false
ENV PORT=${PORT}
ENV NODE_ENV=production
WORKDIR /app
COPY source/server/package*.json /app/
#might occasionally fail if the prebuilt version can't be downloaded,
# because it can't rebuild it locally
RUN npm ci --omit=dev
COPY ./source/server/migrations /app/migrations
COPY ./source/server/templates /app/templates
COPY --from=build /app/dist /app/dist
COPY --from=build /app/source/server/dist/server /app/server
VOLUME [ "/app/files" ]
EXPOSE ${PORT}
CMD node server/index.js
This diff is collapsed.
{
"name": "e-corpus",
"version": "1.0.0",
"description": "3D model database and content management system with integrated annotations and stories 3D editor",
"scripts": {
"start": "cd source/server/ && npm start",
"test": "echo \"Error: no test specified\" && exit 1",
"build-ui": "cd source/ui && webpack --mode=production",
"build-server": "tsc -b source/server",
"build-voyager": "cd source/voyager/source/client; webpack --mode=production --env=app=all --output-path=\"../../../../dist\"",
"watch": "cd source/server && HOT_RELOAD=1 NODE_ENV=development ROOT_DIR=\"../../\" nodemon -e ts,js -w . -w ../ui/webpack.config.js -x ts-node index.ts"
},
"author": "Holusion <contact@holusion.com>",
"license": "Apache-2.0",
"devDependencies": {
"copy-webpack-plugin": "^11.0.0",
"css-loader": "^6.2.0",
"css-minimizer-webpack-plugin": "^3.0.2",
"handlebars-loader": "^1.7.3",
"html-webpack-plugin": "^5.3.2",
"mini-css-extract-plugin": "^2.2.0",
"node-sass": "^7.0.3",
"nodemon": "^3.0.2",
"raw-loader": "^4.0.2",
"sass-loader": "^13.2.0",
"source-map-loader": "^3.0.0",
"terser-webpack-plugin": "^5.1.4",
"ts-loader": "^9.4.2",
"ts-node": "^10.9.1",
"typescript": "^4.9.4",
"webpack": "^5.88.1",
"webpack-cli": "^4.9.2"
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment