Skip to content

Commit 0c44db6

Browse files
committed
dockerize openmaint
0 parents  commit 0c44db6

File tree

6 files changed

+82
-0
lines changed

6 files changed

+82
-0
lines changed

Dockerfile

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
FROM tomcat:7-jre8
2+
3+
ENV OPENMAINT=openmaint-1.0-2.3.1
4+
ENV OPENMAINTZIP=${OPENMAINT}.zip
5+
RUN set -x \
6+
&& curl -L http://downloads.sourceforge.net/project/openmaint/1.0/${OPENMAINTZIP} -O \
7+
&& unzip $OPENMAINTZIP
8+
RUN set -x \
9+
&& mv $OPENMAINT openmaint \
10+
&& rm $OPENMAINTZIP
11+
RUN set -x \
12+
&& cd openmaint \
13+
&& cp extras/tomcat-libs/6.0/postgresql-9.1-901.jdbc4.jar $CATALINA_HOME/lib/ \
14+
&& cp scheduler/scheduler-utils-0.1.jar $CATALINA_HOME/lib/ \
15+
&& cp openmaint-*.war $CATALINA_HOME/webapps/openmaint.war
16+
17+
EXPOSE 8080
18+

README.md

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
docker-openmaint
2+
================
3+
4+
Docker image for openMAINT demo application.
5+
6+
[openMAINT](openmaint.org) is open source property management software. The installation process is arduous, so this docker image mimics the installation directions and loads the sample database for the purpose of testing out the software.
7+
8+
Builds on:
9+
* https://github.com/docker-library/postgres/blob/master/9.1/Dockerfile
10+
* https://github.com/docker-library/tomcat/blob/master/7-jre8/Dockerfile
11+
12+
Usage:
13+
14+
docker-compose up
15+
16+
Even with all the setup in docker, there is still some first run configuration for openMAINT.
17+
18+
* Visit: http://0.0.0.0:8080/openmaint/
19+
20+
* Pick a language, click Next.
21+
22+
* CMDBuild Database type: Existing
23+
* CMDBuild Database name: postgres
24+
* Host: postgres
25+
* Port: 5432
26+
* Super user: postgres
27+
* Password: postgres
28+
* Test the connection if you like, then click Finish.
29+
30+
Finally, you can login to the application:
31+
* Username: admin
32+
* Password: admin
33+

docker-compose.yml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
openmaint:
2+
build: .
3+
ports:
4+
- "8080:8080"
5+
links:
6+
- postgres
7+
postgres:
8+
build: postgres
9+

postgres/Dockerfile

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM postgres:9.1
2+
3+
RUN apt-get update && apt-get install -y curl unzip
4+
ENV OPENMAINT=openmaint-1.0-2.3.1
5+
ENV OPENMAINTZIP=${OPENMAINT}.zip
6+
RUN set -x \
7+
&& curl -L http://downloads.sourceforge.net/project/openmaint/1.0/${OPENMAINTZIP} -O \
8+
&& unzip $OPENMAINTZIP
9+
RUN set -x \
10+
&& mv $OPENMAINT openmaint \
11+
&& rm $OPENMAINTZIP
12+
ADD init-openmaint-postgres.sh /docker-entrypoint-initdb.d/
13+
ADD openmaint-demo.sql /docker-entrypoint-initdb.d/
14+

postgres/init-openmaint-postgres.sh

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
3+
# https://github.com/Wenzel/docker-owncloud/tree/master/db
4+
# http://www.postgresql.org/docs/9.1/static/app-pgrestore.html
5+
# http://dba.stackexchange.com/questions/49369/postgres-dump-to-txt-file
6+
7+
pg_restore /openmaint/database/openmaint-demo.backup > /docker-entrypoint-initdb.d/openmaint-demo.sql
8+

postgres/openmaint-demo.sql

Whitespace-only changes.

0 commit comments

Comments
 (0)