Skip to content
Snippets Groups Projects
Commit 443fd739 authored by David Beniamine's avatar David Beniamine
Browse files

Merge branch '24-everything-from-git-no-prod-build-for-dev' into 'main'

Resolve "Build dependencies from POC"

Closes #24

See merge request iiif/POC-mirador!17
parents 68c7873d b9722139
Branches
No related tags found
1 merge request!17Resolve "Build dependencies from POC"
FROM debian:stable as builder
RUN apt-get update && apt-get install -y npm git
FROM node:14 as mirador
RUN apt-get update && apt-get install -y git
COPY . /opt
RUN chown -R node:node /opt
EXPOSE 9000
WORKDIR /opt
RUN npm ci
USER node
CMD npm run serve
FROM mirador as builder
RUN npm install
RUN npm run build
FROM caddy:latest as httpd
......
FROM debian:stable-slim
RUN apt-get update && apt-get install -y git npm
RUN useradd --home-dir /opt node
RUN chown node:node /opt
EXPOSE 9000
WORKDIR /opt
USER node
CMD npm run serve
......@@ -22,13 +22,6 @@ This readme assumes that you now a few basic about `docker` and `docker-compose`
Clone the current git repository and cd inside.
*NOTE : the two following steps should become obsolete at some point*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
git submodule init && git submodule update
bash build_deps.sh
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Copy `.env.template` to `.env` and change variables to suit your need.
You **MUST** set at least the `ANNOTOT_SECRET_KEY_BASE` to a random string, the rest is preconfigured for a local development environment.
......
Subproject commit ed51af7660816416b9b5b2df73b2648fa0fbcb4f
Subproject commit a52f4ec738ceeeff96aab7a369bf1cdc019e85c1
#!/bin/bash
cd mirador-video-annotation
docker run --rm -v $PWD:/opt -it node:12 /bin/sh -c "cd /opt && npm install && npm run build:es"
cd ../annotations-plugin
docker run --rm -v $PWD:/opt -it node:12 /bin/sh -c "cd /opt && npm install && npm run build"
version: "3.3"
services:
devserver:
httpd:
build:
context: .
dockerfile: Dockerfile.devserver
target: mirador
restart: $DEV_RESTART
ports:
- $DEV_PORT:9000
......@@ -15,10 +15,6 @@ services:
volumes:
- ./:/opt
httpd:
ports:
- $PORT:80
annotot:
ports:
- ${ANNOTOT_PORT}:3000
version: "3.3"
services:
httpd:
build: .
build:
context: .
dockerfile: Dockerfile
target: httpd
restart: $RESTART
environment:
- CORS_ALLOWED_HOSTS
......
This diff is collapsed.
......@@ -12,8 +12,8 @@
"dependencies": {
"css-loader": "^3.6.0",
"dotenv-webpack": "^8.0.1",
"mirador": "file:mirador-video-annotation",
"mirador-annotations": "file:annotations-plugin",
"mirador": "git+https://gitlab.tetras-libre.fr/iiif/mirador-video-annotation#annotation-on-video",
"mirador-annotations": "git+https://gitlab.tetras-libre.fr/iiif/mirador-annotations.git#tetras-main",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"style-loader": "^1.2.1"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment