Skip to content

Latest commit

 

History

History

graphite

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Graphite

  • Dockerfile for Graphite Project
  • Build on top of Alpine Linux
  • Image Size: 153MB (~100MB in Alpine packages)
  • Dowload Size:

Usage

This image is intended to be used behind an HTTP server like nginx. (See below for development mode.)

  • Pull image docker pull rvernica/graphite or build image docker build -t graphite .

  • Pull official nginx image docker pull nginx

  • Create nginx configuration file, nginx.conf:

    http {
        server {
            location /static {
                alias /opt/graphite/static;
            }
            location / {
                proxy_pass http://graphite:8080;
            }
            ...
        }
        ...
    }
    ...
    

    An example is provided here

  • Start graphite container:

    docker run --name graphite \
        --publish 2003:2003 \
        rvernica/graphite

    On startup, a superuser is created for the grapite-web module with a randomly generated password. The credentials are printed on the screen:

    [graphite-web] Superuser: admin, Password: ...
    

    If you are starting the container with --detach, you can get the credentials by running docker logs graphite. Port 8080 does not need to be published because the container is going to be linked to the nginx container below.

  • Start nginx container:

    docker run --name nginx --publish 80:80 \
        --link graphite:graphite --volumes-from graphite \
        --volume /some/nginx.conf:/etc/nginx/nginx.conf:ro \
        nginx

Additionally this image can also be used without any HTTP server in development mode:

docker run --publish 2003:2003 --publish 8080:8080 \
    rvernica/graphite --debug

If you would like to use a URL prefix (e.g., /graphite), you need to set the URL_PREFIX = '...' variable in the local_settings.py (/opt/graphite/webapp/graphite/local_settings.py) file. This can be done in the post-setup-graphite-web.py script before you build the image. See Graphite documentation for additional details.