├── Dockerfile ├── README.md ├── docker-compose.yml └── postgres ├── Dockerfile ├── init-openmaint-postgres.sh └── openmaint-demo.sql /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM tomcat:7.0.69-jre7 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: -------------------------------------------------------------------------------- 1 | docker-openmaint 2 | ================ 3 | 4 | Docker image for openMAINT demo application. 5 | 6 | [openMAINT](http://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 | 34 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | openmaint: 2 | build: . 3 | ports: 4 | - "8080:8080" 5 | links: 6 | - postgres 7 | postgres: 8 | build: postgres 9 | 10 | -------------------------------------------------------------------------------- /postgres/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM postgres:9.1.18 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: -------------------------------------------------------------------------------- 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 | 9 | -------------------------------------------------------------------------------- /postgres/openmaint-demo.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chabala/docker-openmaint/21944be0e74ea3344ef6ad4d6b505ddf298a70e7/postgres/openmaint-demo.sql --------------------------------------------------------------------------------