Skip to content

Latest commit

 

History

477 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Primate Life Histories Database

Introduction

Primate Life Histories is an online database project with database and web interface to archive, manage, search and download individual-based life history data that have been collected from wild primate populations.

Source Code

Version 2

The source code to PLHDB version 2 is available on GitHub (http://github.com/plhdb-group/plhdb2).

Version 1

The source code to PLHDB version 1 is available on GitHub (http://github.com/NESCent/plhdb).

Credits

  • Concept, content, and scientific requirements: the Evolutionary Ecology of Primate Life Histories Working Group, Susan C Alberts (Duke University, PI), Karen B Strier (University of Wisconsin-Madison, PI).
  • PLHDB version 1 Database and application programming: Xianhua Liu (NESCent), Hilmar Lapp (NESCent).
  • PLHDB version 2: Karl O. Pinc (The Meme Factory, Inc. http://www.karlpinc.com/)

How to Cite

If you use this code or parts of it, please cite the following publication:

Strier, K. B., Altmann, J., Brockman, D. K., Bronikowski, A. M., Cords, M., Fedigan, L. M., Lapp, H., Liu, X., Morris, W. F., Pusey, A. E., Stoinski, T. S., and Alberts, S. C. "The Primate Life History Database: A Unique Shared Ecological Data Resource". Methods in Ecology and Evolution 1, no. 2 (2010): 199–211. http://dx.doi.org/10.1111/j.2041-210X.2010.00023.x

License

This software is released under the GPL v3 license (see included LICENSE), excepting code which extends other projects used on the PLHDB website. Code extending other projects is clearly marked and distributed under the license(s) used by the projects so extended.

Primate Life Histories Database
Copyright (C) 2007-2015 Hilmar Lapp, Xianhua Liu
Copyright (C) 2016 The Meme Factory, Inc. http://www.karlpinc.com/

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Local Development (Docker)

Docker is provided for "developer convenience" - it mirrors the production environment conceptually but not literally.

Description

This repository can be run locally using Docker to provide a reproducible development environment. Docker is not used in staging or production at this time; it exists solely to simplify local setup.

The Dockerized setup provides:

  • PostgreSQL
  • An app container to run make, m4, and database scripts
  • Nginx serving the generated static site
  • Adminer for database inspection

The database is generated from M4 templates automatically. Docker invokes existing Make targets rather than replace this system.

Prerequisites

  • Docker
  • Docker Compose (v2)

Verify:

docker --version
docker compose version

Usage

Setup

To build and start containers

  • use: make dbuild
  • verify: docker compose ps - all services should be in the Up state

To initialize the database and build the site

  • use: make dinitdb
  • verify: access the application or work with the database

Access the application

Adminer runs locally for convenience only - in production, Adminer is on a private network

Working with the Database

To open a shell in the app container

  • use: docker compose exec app bash

To connect with psql

  • use: psql -h db -U postgres

Always specify -h db

Omitting -h causes psql to try a Unix socket, which does not exist

Rebuilding / Resetting

To rebuild containers

  • use: make drebuild

To stop everything and remove the data volume

  • use: make dclean
  • then restart and reinitialize (make dbuild & make dinitdb)

Notes

  • The Postgres container does not expose a host port. Meaning, there are no port conflicts with other Dockerized apps or production database connections (unless explicitly exposed).
  • The design keeps Docker out of production concerns and preserves the Make-based workflow while avoding fagile Unix socket assumptions.

About

Repo for the "new" (as of Sep 2016) web app for the Primate Life Histories Database

Resources

Stars

0 stars

Watchers

3 watching

Forks

Releases

Packages

Contributors

Languages