Open jwalton opened 9 years ago
Oh, hang on, I think this might be my fault... :P
The problem happens when you try to use a custom storage directory for Graphite:
docker run -d --name statsd --restart=always \
-p 8080:80 \
-v /mnt/graphite-storage:/opt/graphite-storage \
-e GRAPHITE_STORAGE_DIR=/opt/graphite-storage \
hopsoft/graphite-statsd
Can fix this by running:
docker run --rm \
-v /mnt/graphite-storage:/opt/graphite-storage \
-e GRAPHITE_STORAGE_DIR=/opt/graphite-storage \
hopsoft/graphite-statsd \
python /opt/graphite/webapp/graphite/manage.py syncdb --noinput
before I run graphite "for reals". You should think about adding this to your startup script, though, as I'm sure I'm not the only one keeping my graphite data outside the container.
Yeah... I've had several requests to automagically setup the dir structure for logs & graphite regardless of where you've mounted the volumes. I've been thinking through this quite a bit & will have a solution pushed up soon
continue this issue, I see /opt/graphite is not empty but exported as volume, if I start a container as -v /data/graphite/:/opt/graphite
option, it always fail to start. So what's the point to export /opt/graphite as a volume?
BTW, what is /opt/graphite-storage
? I didn't see it in README or Dockerfile as a volume.
OK, I saw GRAPHITE_STORAGE_DIR in conf/graphite/carbon.conf. But still confused why it says /opt/graphite is a volume? Because you can't mount an empty volume to it, that will break graphite service, so as /etc/nginx
, /opt/statsd
, /etc/logrotate.d
and /var/log
.
em, after go-through docker document again, I think I understand how I should use these volumes, my bad, sorry.
I went thru this volume initialization problem too.
I created a script that initializes the file structure by starting the container once, then docker cp
the files to the volumes. I just then have to start a new container with those volumes mounted and it works.
I shared the script in this gist : https://gist.github.com/YannRobert/3aa307a5e5d510d58e23
Yeah, I ran into this too...
See #43
On the latest version, when I try to access port 80, I get: