Browse Source

update to latest cpee

amol 4 years ago
parent
commit
262d3cfdd3
3 changed files with 25 additions and 15 deletions
  1. 7 3
      README.md
  2. 9 3
      Dockerfile
  3. 9 9
      docker-compose.yml

+ 7 - 3
README.md

@@ -4,8 +4,12 @@ CPEE Dockerfiles for a local installation.
 
 Requirements: Docker and Docker Compose
 
-Put the required CPEE `js_libs` on your host under `/var/www/html/`. If you pick a different path, then also update the `docker-compose.yml`.
+Download this project (zip or clone) and change into the root dir. 
+
+Run `docker-compose up` in a terminal of your choice (Windows: Powershell, Command Prompt; MacOS: Terminal)
+
+Now, in your browser, go to `http://localhost:9090/cpee-cockpit/` and have fun!
+
+
 
-Run `docker build -t "cpee:1.4.26" . `
 
-Run `docker-compose up`

+ 9 - 3
Dockerfile

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

+ 9 - 9
docker-compose.yml

@@ -1,24 +1,24 @@
 version: '3'
 
 services:
+
   cpee:
-    image: "cpee:1.4.26"
-    network_mode: "host" # Temporary workaround for using localhost address  in process templates
+    build: ./cpee
+    network_mode: "host" # Enable using 'localhost' in process templates
     ports:
         - "8298:8298"
     volumes:
         - cpeeCockpit:/cpee-cockpit
-        - cpeeServer:/cpee-server
+
   nginx:
     image: "nginx:alpine"
     ports:
-        - "9111:80"
+        - "9090: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
+        - cpeeCockpit:/usr/share/nginx/html/cpee-cockpit:ro
+        - ./cpee/js_libs:/usr/share/nginx/html/js_libs:ro
+
 volumes:
     # System managed volumes
     cpeeCockpit:
-    cpeeServer:
+