Giter VIP home page Giter VIP logo

mcnb-alibey-docker's Introduction

Ali-Bey Docker

Dockerized version of the Ali-bey georeferencing database.

General structure

In the docker-compose.yml file, we define the following services:

  • web - The main container, it runs the django app through a gunicorn server
  • db - The database container. It hosts a PostgreSQL instance with all the app data.
  • nginx - The web server. It proxies all traffic back and forth to the gunicorn instance, also serves the django static resources.
  • geoserver - A Web Map Service container, which runs a GeoServer instance inside a Tomcat container

Also, the following volumes:

  • static-volume - A volume containing all the django static resources
  • geoserver-data-dir - A volume containing the GeoServer data directory
  • postgres-data - A volume which contains all the PostgreSQL data files

Getting Started

These instructions will help you set up this project on a Linux system. It assumes Git is installed in the host machine.

Prerequisites

The host machine needs a running Docker engine. This version of Ali-Bey has been tested on Docker v20.10.2.

Installing

First, create a fresh clone of the repository:

cd ~/tmp
git clone https://github.com/aescobarr/mcnb-alibey-docker.git
cd mcnb-alibey-docker/

The app part of the docker images is included in this project via a Git submodule which points to the adequate branch of the Ali-Bey app. To initialize the submodule, execute the following commands:

git submodule init
git submodule update

Configuration

All configuration parameters are taken from an .env file in the project root. You can rename the included file dot-env-example as follows:

mv dot-env-example .env

And adjust the following values:

# This key tells django to run in debug mode (1) or not (0)
# Don't run django with DEBUG=1 in production environments!
DEBUG=1
# Long, complicated string that django uses internally for things like identifying sessions. Keep it unique.
SECRET_KEY=foo
# Hosts which will be allowed to connect to Django
DJANGO_ALLOWED_HOSTS=localhost 127.0.0.1 [::1]

# Admin user credentials. This user will be created when the container is initialized and you will 
# be able to use it for administrative purposes
DJANGO_ADMIN_USER=alibey_admin
DJANGO_ADMIN_PASSWORD=XXXXXXXXXXX
[email protected]

# Regular user credentials. This user also is created when the container is initialized.
DJANGO_REGULAR_USER=alibey_regular
DJANGO_REGULAR_PASSWORD=YYYYYYYYYY
[email protected]

# Django database engine. Do not change this value
SQL_ENGINE=django.contrib.gis.db.backends.postgis
# Name of the app database
SQL_DATABASE=djangoref
# Name of the app database owner user (postgres user)
SQL_USER=aplicacio_georef
# The password of the database owner user
SQL_PASSWORD=ZZZZZZZZZZ
# DB host address. Do not change this value.
SQL_HOST=db
# Database running port
SQL_PORT=5432

# Tomcat admin user
TOMCAT_USER=admintom
# Tomcat admin password
TOMCAT_PASSWORD=TTTTTTTTTTTT
# Tomcat home
TOMCAT_DIR=/usr/local/tomcat
# Geoserver data dir
GEOSERVER_DATA_DIR=/opt/geoserver/data_dir
# Geoserver admin user name
GEOSERVER_ADMIN_USER=admin
# Geoserver admin user password
GEOSERVER_ADMIN_PASSWORD=VVVVVVVVVVVVVVV
# Bing maps API key. If you don't have one, Bing Maps will not work
BING_MAPS_API_KEY='my_bings_api_key'

Finally, the remaining thing to do is build the docker images:

docker-compose build

And run them:

docker-compose up

This should build and start all the containers from the images. The app is exposed via the following address:

http:127.0.0.1:1337

mcnb-alibey-docker's People

Contributors

aescobarr avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

mcnb-alibey-docker's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.