ソースを参照

docker files for running cpee locally

Amolkirat Singh Mangat 5 年 前
コミット
9c8ffb3fa5
共有3 個のファイルを変更した47 個の追加1 個の削除を含む
  1. 15 0
      Dockerfile
  2. 8 1
      README.md
  3. 24 0
      docker-compose.yml

+ 15 - 0
Dockerfile

@@ -0,0 +1,15 @@
+# CPEE Image
+FROM ruby:2.6-alpine
+RUN apk add --no-cache --virtual .build-deps \
+        ruby-dev \
+        rasqal-dev \
+        raptor2-dev \
+        build-base \
+        icu-dev \
+    && gem install cpee -v 1.4.25 \
+    && apk del .build-deps \
+    && apk add libcurl \
+    && ln -s $GEM_HOME/gems/cpee-1.4.25/server /cpee-server \
+    && ln -s $GEM_HOME/gems/cpee-1.4.25/cockpit /cpee-cockpit 
+WORKDIR /cpee-server
+CMD ruby server.rb -v start 

+ 8 - 1
README.md

@@ -1,3 +1,10 @@
 # cpee-docker
 
-Cpee Dockerfiles for local installation
+CPEE Dockerfiles for local installation.
+
+Requirements: Docker and Docker Compose
+
+Put the required CPEE `js_libs` on your host at `/var/www/html/`. If you pick a different path, then also update the `docker-compose.yml`.
+
+Run `docker build -t "cpee:1.4.25" . `
+Run `docker-compose up`

+ 24 - 0
docker-compose.yml

@@ -0,0 +1,24 @@
+version: '3'
+
+services:
+  cpee:
+    image: "cpee:1.4.25"
+    network_mode: "host" # Temporary workaround for using localhost address  in process templates
+    ports:
+        - "8298:8298"
+    volumes:
+        - cpeeCockpit:/cpee-cockpit
+        - cpeeServer:/cpee-server
+  nginx:
+    image: "nginx:alpine"
+    ports:
+        - "9111:80"
+    volumes:
+        - cpeeCockpit:/usr/share/nginx/html/cockpit:ro
+          # Note, that the js libs had to be manually downloaded, 
+          # they aren't part of the cpee gem.
+        - /var/www/html/js_libs:/usr/share/nginx/html/js_libs:ro
+volumes:
+    # System managed volumes
+    cpeeCockpit:
+    cpeeServer: