This is an automated email from the ASF dual-hosted git repository.

dklco pushed a commit to branch master
in repository 
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-app-cms.git

commit ab971f9fd7611d8917b08128b9628b1167bd85de
Author: Dan Klco <[email protected]>
AuthorDate: Mon Feb 3 01:10:20 2020 -0500

    Updating to back with MongoDB rather than on the filesystem
---
 docker/README.md          |  2 +-
 docker/cms/Dockerfile     |  2 +-
 docker/docker-compose.yml | 16 +++++++++++++---
 3 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/docker/README.md b/docker/README.md
index 33de3ea..538d23e 100644
--- a/docker/README.md
+++ b/docker/README.md
@@ -2,7 +2,7 @@
 
 This is a sample Docker Compose configuration for using Apache Sling CMS in a 
containerized environment.
 
-It will start a container with the Apache Sling CMS and a webcache container 
pre-configured to proxy and cache two URLs.
+It will start a container with the Apache Sling CMS backed by MongoDB and a 
webcache container pre-configured to proxy and cache two URLs.
 
 ## Dependencies
 
diff --git a/docker/cms/Dockerfile b/docker/cms/Dockerfile
index cc2dd50..911c915 100644
--- a/docker/cms/Dockerfile
+++ b/docker/cms/Dockerfile
@@ -27,4 +27,4 @@ RUN curl -L 
https://search.maven.org/remotecontent?filepath=org/apache/sling/org
 EXPOSE 8080
 
 # Start Sling CMS
-CMD exec java -jar org.apache.sling.cms.jar
+CMD exec java -Dsling.run.modes=oak_mongo -Doak.mongo.uri=mongo 
-Doak.mongo.db=sling -jar org.apache.sling.cms.jar
diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml
index aa64ca9..d4ca655 100644
--- a/docker/docker-compose.yml
+++ b/docker/docker-compose.yml
@@ -2,9 +2,19 @@ version: '3'
 services:
   cms:
     build: cms
-    ports:
-      - "8080:8080"
-  webacache:
+    expose:
+      - "8080"
+    depends_on:
+    - mongo
+  mongo:
+    image: mongo
+    expose:
+    - "27017"
+    volumes:
+    - data-volume:/data/db
+  webcache:
     build: webcache
     ports:
       - "80:80"
+volumes:
+  data-volume:

Reply via email to