roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject [roller] branch bootstrap-ui updated: Simple Dockerfile for Roller and docker-compose setup for running Tomcat, PostgreSQL and Roller.
Date Fri, 18 Jan 2019 12:55:18 GMT
This is an automated email from the ASF dual-hosted git repository.

snoopdave pushed a commit to branch bootstrap-ui
in repository https://gitbox.apache.org/repos/asf/roller.git


The following commit(s) were added to refs/heads/bootstrap-ui by this push:
     new e51dc89  Simple Dockerfile for Roller and docker-compose setup for running Tomcat,
PostgreSQL and Roller.
e51dc89 is described below

commit e51dc895920f0e8b8ba49681bfce4015158be83d
Author: Dave Johnson <snoopdave@gmail.com>
AuthorDate: Fri Jan 18 07:55:12 2019 -0500

    Simple Dockerfile for Roller and docker-compose setup for running Tomcat, PostgreSQL and
Roller.
---
 deployment/docker-compose/Dockerfile         | 54 ++++++++++++++++++++++++++++
 deployment/docker-compose/README.md          |  1 +
 deployment/docker-compose/docker-compose.yml | 19 ++++++++++
 deployment/docker-compose/entry-point.sh     | 34 ++++++++++++++++++
 4 files changed, 108 insertions(+)

diff --git a/deployment/docker-compose/Dockerfile b/deployment/docker-compose/Dockerfile
new file mode 100644
index 0000000..d43f42c
--- /dev/null
+++ b/deployment/docker-compose/Dockerfile
@@ -0,0 +1,54 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  The ASF licenses this file to You
+# under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.  For additional information regarding
+# copyright in this work, please see the NOTICE file in the top level
+# directory of this distribution.
+
+FROM tomcat:8.0-jre8-alpine
+
+ARG STORAGE_ROOT=/var/lib/roller/data
+ARG DATABASE_JDBC_DRIVERCLASS=com.mysql.jdbc.Driver
+ARG DATABASE_JDBC_CONNECTIONURL=mysql://localhost:3306/rollerdb?autoReconnect=true&useUnicode=true&characterEncoding=utf-8&mysqlEncoding=utf8
+ARG DATABASE_JDBC_USERNAME=scott
+ARG DATABASE_JDBC_PASSWORD=tiger
+
+
+# get Roller from Apache mirror
+
+WORKDIR /usr/local/roller
+RUN wget -O roller.tar.gz http://www-us.apache.org/dist/roller/roller-5.1/v5.1.2/roller-release-5.1.2-standard.tar.gz
+RUN tar -xf roller.tar.gz
+RUN ln -s roller-release-*/ release
+
+# install Roller WAR as ROOT.war, create data dirs
+
+WORKDIR /usr/local/roller
+RUN rm -rf /usr/local/tomcat/webapps/*
+RUN cp release/webapp/roller.war /usr/local/tomcat/webapps/ROOT.war
+RUN mkdir -p data/mediafiles data/searchindex
+
+# download PostgreSQL and MySQL drivers plus Mail and Activation JARs
+
+WORKDIR /usr/local/tomcat/lib
+RUN wget -O mysql.jar http://repo2.maven.org/maven2/mysql/mysql-connector-java/5.1.43/mysql-connector-java-5.1.43.jar
+RUN wget http://repo2.maven.org/maven2/javax/mail/mail/1.4.1/mail-1.4.1.jar
+RUN wget http://repo2.maven.org/maven2/javax/activation/activation/1.1.1/activation-1.1.1.jar
+
+# start Tomcat
+
+ADD entry-point.sh /usr/local/tomcat/bin
+RUN chgrp -R 0 /usr/local/tomcat
+RUN chmod -R g+rw /usr/local/tomcat
+
+WORKDIR /usr/local/tomcat
+ENTRYPOINT /usr/local/tomcat/bin/entry-point.sh
diff --git a/deployment/docker-compose/README.md b/deployment/docker-compose/README.md
new file mode 100644
index 0000000..4a8d593
--- /dev/null
+++ b/deployment/docker-compose/README.md
@@ -0,0 +1 @@
+# Deploy
\ No newline at end of file
diff --git a/deployment/docker-compose/docker-compose.yml b/deployment/docker-compose/docker-compose.yml
new file mode 100644
index 0000000..5aed499
--- /dev/null
+++ b/deployment/docker-compose/docker-compose.yml
@@ -0,0 +1,19 @@
+version: '3.2'
+
+services:
+
+   postgresql:
+      image: "postgres:10.0"
+      ports:
+         - "5432:5432"
+      volumes:
+         - type: bind
+           source: /Users/dave/src/apache-roller/tomcat-base/data/postgresql
+           target: /var/lib/postgresql/data
+      environment:
+         - POSTGRES_DB=rollerdb
+         - POSTGRES_USER=scott
+         - POSTGRES_PASSWORD=tiger
+
+
+
diff --git a/deployment/docker-compose/entry-point.sh b/deployment/docker-compose/entry-point.sh
new file mode 100755
index 0000000..e8a51bf
--- /dev/null
+++ b/deployment/docker-compose/entry-point.sh
@@ -0,0 +1,34 @@
+#!/usr/bin/env bash
+
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  The ASF licenses this file to You
+# under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.  For additional information regarding
+# copyright in this work, please see the NOTICE file in the top level
+# directory of this distribution.
+
+
+cat > /usr/local/tomcat/lib/roller-custom.properties << EOF
+installation.type=auto
+mediafiles.storage.dir=${STORAGE_ROOT}/roller_mediafiles
+search.index.dir=${STORAGE_ROOT}/roller_searchindex
+log4j.appender.roller.File=/usr/local/tomcat/logs/roller.log
+database.configurationType=jdbc
+database.jdbc.driverClass=${DATABASE_JDBC_DRIVERCLASS}
+database.jdbc.connectionURL=${DATABASE_JDBC_CONNECTIONURL}
+database.jdbc.username=${DATABASE_JDBC_USERNAME}
+database.jdbc.password=${DATABASE_JDBC_PASSWORD}
+EOF
+
+/usr/local/tomcat/bin/catalina.sh run
+
+


Mime
View raw message