Docker Installation

How to install OpenDataBio with Docker

The easiest way to install and run OpenDataBio is using Docker and the docker configuration files provided, which contain all the needed configurations to run ODB. Uses nginx and mysql, and supervisor for queues

Docker files


These are adapted from this link, where you find a production setting as well.


Download OpenDataBio
  1. Make sure you have Docker and Docker-compose installed in your system;
  2. Check if your user is in the docker group created during docker installation;
  3. Download or clone the OpenDataBio in your machine;
  4. Make sure your user is the owner of the opendatabio folder created and contents, else change ownership and group recursively to your user
  5. Enter the opendatabio directory
  6. Edit and adjust the environment file name .env.docker (optional)
  7. To install locally for development just adjust the following variables in the Dockerfile, which are needed to map the files owners to a docker user;
    1. UID the numeric user your are logged in and which is the owner of all files and directories in the opendatabio directory.
    2. GDI the numeric group the user belongs, usually same as UID.
  8. File Makefile contains shortcuts to the docker-compose commands used to build the services configured in the docker-compose.yml and auxiliary files in the docker folder.
  9. Build the docker containers using the shortcuts (read the Makefile to undersand the commands)
make build
  1. Start the implemented docker Services
make start
  1. See the containers and try log into the laravel container
docker ps
make ssh #to enter the container shell
make ssh-mysql #to enter the mysql container, where you may access the database shell using `mysql -uroot -p` or use the laravel user
  1. Install composer dependencies
make composer-install
  1. Migrate the database
make migrate
  1. You may also replace the Locations and Taxons tables with seed data:
make seed-odb
  1. If worked, then Opendatabio will be available in your browser http::/localhost:8080.
  2. Login with superuser and password password1
  3. Additional configurations in these files are required for a production environment and deployment;

Data persistence

The docker images may be deleted without loosing any data. The mysql tables are stored in a volume. You may change to a local path bind.

docker volume list


See the contents of Makefile

make stop
make start
make restart
docker ps

If you have issues and changed the docker files, you may need to rebuild:

#delete all images without loosing data
make stop
docker system prune -a  #and accepts Yes
make build
make start