greppy.org-docker

greppy.org-docker

Docker image for greppy.org

Name Last Update
assets Loading commit data...
docs Loading commit data...
Dockerfile Loading commit data...
LICENSE Loading commit data...
Makefile Loading commit data...
README.md Loading commit data...

greppy.org docker image

This is the build receipt for the (*.)greppy.org website.

Requirements

Production

  • A running MongoDB server

Development

Quick Start

# Run the container
$ docker run -d \
    -p 10080:80 -e 'MONGODB_HOST=10.0.0.11' \
    "e5.lan:5000/greppy.org:0.7.2"

Available Configuration Parameters

greppy.org

  • GREPPY_ORG_ENABLE: Start the home module. Defaults to true.
  • GREPPY_ORG_DOMAIN: Set the external domain for the home module. Defaults to greppy.org.
  • GREPPY_ORG_PROTOCOL: Set the protocol for the external domain. Defaults to http.
  • GREPPY_ORG_SLAVES: Cluster slaves map. Defaults to "'localhost'".
  • GREPPY_ORG_PORT: The tcp/port we start listening. Defaults to 10080.
  • GREPPY_ORG_WORKER: Number of threads for this module. Defaults to 4.

blog.greppy.org

  • BLOG_GREPPY_ORG_ENABLE: Start the blog module. Defaults to true.
  • BLOG_GREPPY_ORG_DOMAIN: Set the external domain for the blog module. Defaults to blog.greppy.org.
  • BLOG_GREPPY_ORG_PROTOCOL: Set the protocol for the external domain. Defaults to http.
  • BLOG_GREPPY_ORG_SLAVES: Cluster slaves map. Defaults to "'localhost'".
  • BLOG_GREPPY_ORG_PORT: The tcp/port we start listening. Defaults to 10081.
  • BLOG_GREPPY_ORG_WORKER: Number of threads for this module. Defaults to 4.

docs.greppy.org

  • DOCS_GREPPY_ORG_ENABLE: Start the docs module. Defaults to true.
  • DOCS_GREPPY_ORG_DOMAIN: Set the external domain for the docs module. Defaults to docs.greppy.org.
  • DOCS_GREPPY_ORG_PROTOCOL: Set the protocol for the external domain. Defaults to http.
  • DOCS_GREPPY_ORG_SLAVES: Cluster slaves map. Defaults to "'localhost'".
  • DOCS_GREPPY_ORG_PORT: The tcp/port we start listening. Defaults to 10082.
  • DOCS_GREPPY_ORG_WORKER: Number of threads for this module. Defaults to 4.

api.greppy.org

  • API_GREPPY_ORG_ENABLE: Start the service module. Defaults to false.
  • API_GREPPY_ORG_DOMAIN: Set the external domain for the service module. Defaults to api.greppy.org.
  • API_GREPPY_ORG_PROTOCOL: Set the protocol for the external domain. Defaults to http.
  • API_GREPPY_ORG_SLAVES: Cluster slaves map. Defaults to "'localhost'".
  • API_GREPPY_ORG_PORT: The tcp/port we start listening. Defaults to 10083.
  • API_GREPPY_ORG_WORKER: Number of threads for this module. Defaults to 2.

mongodb

  • MONGODB_HOST: Hostname/IP address of the MongoDB server.
  • MONGODB_PORT: Port of the MongoDB server. Defaults to 27017.
  • MONGODB_USERNAME: Username for auth - this is optional.
  • MONGODB_PASSWORD: Password for auth - this is optional.
  • MONGODB_DBNAME: Database on the MongoDB server. Defaults to greppy_blog.
  • MONGODB_URI: Complete MongoDB URI - if given all other options are disabled. You could add some specials like a replicaset with the help of it.

nginx

  • NGINX_PORT: Set the nginx port to listen on. Defaults to 80.

Default ports

The container runs a nginx as reverse proxy to bind up the domains on a single port. This is usefull in case of a varnish in front so you only need one backend for the whole application. But it is also possible to link and connect the seperate ports of the application to the host interface. The table shows the mapping:

Port Domain
10080 greppy.org
10081 docs.greppy.org
10082 blog.greppy.org
10083 api.greppy.org

Development

# Build the container
$ make build

# Start the builded container (quickstart)
$ make start

# Stop the container
$ make stop

# Purge the build - so you could start over with
# another build
$ make clean

# See logs for the running container
$ make logs

# Start a bash session on the builded container for debugging.
# This command need **clean** or **stop** like the normal **start**.
$ make start-bash