Created
October 16, 2015 17:41
-
-
Save feliperoberto/5585c51e291a8d065b6d to your computer and use it in GitHub Desktop.
seaweeds on docker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
master: | |
image: seaweedfs | |
command: "master" | |
ports: | |
- '9333:9333' | |
- '8080:8080' | |
extra_hosts: | |
- 'master:192.168.0.15' | |
slave: | |
image: seaweedfs | |
links: | |
- master:master | |
command: "volume -dir='/data' -max=5 -mserver='master:9333' -port=8082 -ip='master'" | |
ports: | |
- '8082:8082' |
Are you planning on putting this up on a public repo somewhere? I'd like to show off this example.
If you aren't, do you mind if I create a sandbox-seaweedfs
repo ?
Nice,
as soon as possible i'll try.
thank you for help me!
Sorry, for some reason I have not seen your last comment (about to turn it public).
Well, feel free to do it. In this way other people could be helped in the future.
Man, I run your example now. Work like a charm.
Very thank you!
If you make a PR let me know to give you an up vote!
Cool, I'll do that sometime soon!
;)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This works:
If you're using docker-compose 1.4.2 or earlier, make it
$(hostname -i)
instead of$$(hostname -i)
I used the
Dockerfile
from the repo to builddnephin/seaweedfs
.Here's how it works:
sh
so that we can run other commands as part of the commandline["..."]
as the command, the entire thing is taken as a single paramter tobash -c
Another "nicer" way to do this might be to create a bash script as the entrypoint:
run_weed.sh
and change the
ENTRYPOINT /run_weed.sh
(don't forget tochmod +x run_weed.sh
).That way you'll be able to just specify the command as you would normally.