joeldg / bowhead

PHP trading bot framework
Apache License 2.0
801 stars 288 forks source link

Offical docker image with volume mapping for user files #76

Open seertenedos opened 6 years ago

seertenedos commented 6 years ago

WOndering if it would be possible to have an offical docker image pushed to dockerhub and then have value mappings people could set to local folders for the environment config and user files but still have all the non user files built into the image. Saves needing a docker environment for building and run one to run it like ECS or in my case my NAS.

libasoles commented 6 years ago

Hi. I've just published this suggestion to Joel in medium. All you need is to create your container with this sentence (i'm editing the existing one in create_docker file):

create_docker docker build -t bowhead docker/ && docker run --name=bowhead -p 127.0.0.1:8090:8080 -v /your/local/folder:/var/www/bowhead bowhead

So, basically you map your local folder to docker with -v /your/local/folder:/var/www/bowhead bowhead

Hope this help.

dhensen commented 6 years ago

Keep in min that because all application and backing services currently run in one container you still have to restart services when you modify sources...

I'm personally waiting for the good stuff that @joeldg is currently cooking up before going all out on dockerizing everything!

libasoles commented 6 years ago

What services? This is simple: you modify the code in your IDE, and the container code updates too. Then you run a command or fetch the Api. So, maybe you are thinking in a different scenario, but this works great in my localhost.

rxmg-joeldg commented 6 years ago

I just pushed a ton of changes, and am going to get to the docker as soon as I get the new data services wrapped

rxmg-joeldg commented 6 years ago

update: I literally spent all day building docker containers for my work, so I am def in good form for doing and getting an official Hub repo up.. more later

seertenedos commented 6 years ago

sounds great

On Sat, Jan 6, 2018 at 6:25 PM, Joel De Gan notifications@github.com wrote:

update: I literally spent all day building docker containers for my work, so I am def in good form for doing and getting an official Hub repo up.. more later

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/joeldg/bowhead/issues/76#issuecomment-355729538, or mute the thread https://github.com/notifications/unsubscribe-auth/AAYecT6GA-3cuKVk8uivXAuUh9BtNEXwks5tHx_qgaJpZM4RR2Tj .

dhensen commented 6 years ago

@libasoles all services defined to be running inside the container: mysql, redis, php-fpm and all workers started with supervisord. To me those are all separate services.