How to run OpenDocMan inside Docker

Running an OpenDocMan Document Management System Inside a Docker Container

We are pleased to announce our first release of OpenDocMan on Docker, a containerized deployment for OpenDocMan that utilizes the fantastic Docker container system. With this new method of deployment you can eliminate all of the server set up and just get to running OpenDocMan inside Docker right away . As long as you can get a local Docker server up and running (very easy!) you can deploy our docker container to your server in seconds and have a fully functional OpenDocMan installation.

What Is Docker?

Docker is a system that provides “containerized” deployments of applications. If you want to know more about it you should visit this page: What Is Docker?

Why don’t I just install OpenDocMan the old way?

Getting an OpenDocMan server up and running from the source code can be straightforward for those with some experience with setting up web servers. Unfortunately, even experienced users can have issues with their server environment that prevent them from being able to use OpenDocMan. We also have plenty of potential users who would like to use OpenDocMan but do not have the resources to properly set up a web server. We want to help anyone in that situation. With this new containerized method of installation we completely eliminate the web server setup. If you can create a new Linux server in the cloud (or locally), you can run OpenDocMan inside Docker and have an open source document management system running in minutes (or seconds if your real snappy!).

Ok, I will give it a go, what next?

The first thing you need to do is make sure you have a running MySQL server with an OpenDocMan database created and a username/password to access it. This OpenDocMan Docker we are using for this tutorial is just the code and the web server. The database is not part of the container. You will then need to decide on where you want to install your Docker server. A Docker server runs on either Linux, or by using a tool called Boot2Docker for Mac which will emulate a Linux server on your Mac for testing/development purposes. The easiest way to get started is to utilize a cloud server company that can give you a Docker server with a click of a button. We have found Digital Ocean to be a good, inexpensive provider for turn-key Docker servers. Once you have your docker server running….

I have the Docker server up, lets do this!

Ok, the hard part is out of the way. There is a decision you need to make. You can:

1) Checkout our github repository containing our Docker build files and “build” an image to use
2) Download our OpenDocMan image directly from our Docker hub repository

If you think you might be customizing the installation you will be better of running from the github repository. If you just want to get going quickly it would be best to start with our Docker Hub repository.

Running OpenDocMan from a Dockerfile

This method of building the OpenDocMan application from a build file will allow you to customize anything needed for your particular environment. To get your document management server going:

  1. Login to your docker server
  2. Make sure you have “git” installed on the server. If not, use either apt-get or yum to install it
    1. apt-get install git
    2. yum install git
  3. Now you will clone our OpenDocMan docker build repository
    1. git clone ./docker-opendocman-minimal
  4. Now lets build the image
    1. mkdir /var/odm_data
    2. cd docker-opendocman-minimal
    3. docker build –rm –tag=”docker-opendocman-minimal” .   (don’t forget the dot)
    4. docker images
  5. We have an image now, we want to actually “run” it on our Docker server
    1. docker run -d -p 80:80 -v /var/odm_data:/var/www/odm_data docker-opendocman-minimal
    2. docker ps
  6. Now that its up and running you should be able to visit your servers IP in your browser and be present with the installation page

Running OpenDocMan from a Docker Hub Image

This way of running OpenDocMan Docker image will allow you to skip the build process entirely and just “run” the image in your Docker server

  1. Login to your docker server
  2. Run the OpenDocMan Docker image
    1. mkdir /var/odm_data
    2. docker run -d -p 80:80 -v /var/odm_data:/var/www/odm_data stephenlawrence/opendocman-www:minimal
    3. docker ps
  3. You can now visit your server IP and you will see the installation page

I think its running, what do I do now?

Well, you can login to the container and poke around, or you can visit your Docker servers’ IP address and you should see your OpenDocMan installer.

Whats next?

We are going to be putting together a MySQL container that will come pre-installed with a running OpenDocMan database, ready-to-use with your OpenDocMan application container. Stay Tuned!



OpenDocMan v1.2.9 Released

v1.2.9 includes bug fixes as well as new features. The release includes database updates.

#182 Details page is showing reviewer comments instead of the file comment
#181 Site settings page doesn’t show error messages
#180 Add a max_query limit to the site settings to improve performance. This should help users who have a large amount of files and noticed slow page loads on the main page, especially admin users. We will no “limit” the number of files that show up in the normal file list page, but have no limit for search results. This limit will be set in the Admin->Site Settings->max_query setting with a default to 500.
#179 Clean up the db install/upgrade to make it more clear
#177 Login page – text has no left margin
#176 Missing columns int the database.sql file
#87 Missing slash on the end of the dataDir (Site Settings Page) causes problems