Run Smashing in an Alpine Docker container on DC/OS.
Based on Smashing Alpine Container - https://hub.docker.com/r/rgcamus/alpine_smashing
git clone https://github.com/keith-mcclellan/smashing-on-dcos
cd smashing-on-dcos
docker build -t smashing-on-dcos .
docker run -d -p 8080:3030 keithmcclellan/smashing-on-dcos
or
dcos marathon app add marathon.json
(local) And point your browser to http://localhost:8080/, or to http://localhost:8080/sampletv for a 1080p TV layout.
(on DC/OS) Install and configure marathon-lb Browse to (public-node):3030
If you want smashing to use a custom port inside the container, e g 8080, use the environment variable $PORT
:
docker run -d -e PORT=8080 -p 80:8080 keithmcclellan/smashing_on_dcos
To provide a custom dashboard, use container volume /dashboards:
docker run -v=/my/custom/dashboards:/dashboards -d -p 8080:3030 keithmcclellan/smashing_on_dcos
(Don't forget to also provide the layout.erb)
To provide custom jobs, use container volume /jobs:
docker run -v=/my/cool/job:/jobs -d -p 8080:3030 keithmcclellan/smashing_on_dcos
To install custom widgets supply the gist IDs of the widgets as an environment variable:
docker run -d -e WIDGETS=5641535 -p 8080:3030 keithmcclellan/smashing_on_dcos
This example will install the Random Aww widget before starting smashing. Multiple widgets can be supplied.
Also you can use local custom widgets
docker run -v=/my/cool/widgets:/widgets -d -p 8080:3030 keithmcclellan/smashing_on_dcos
To install gems, supply the gem name(s) as an environment variable:
docker run -d -e GEMS=instagram -e WIDGETS=5278790 -p 8080:3030 keithmcclellan/smashing_on_dcos
This example installs the Instagram photos by location widget, which depends on the instagram gem. Multiple gems and widgets can be supplied like so:
docker run -d -e GEMS="mysql instagram" -e WIDGETS=5278790 -p 8080:3030 keithmcclellan/smashing_on_dcos
To provide custom 404 and favicon, use container volume /public.
The configuration file config.ru
is available on volume /config.
Edit this file to change your API key, to add authentication and more.
The smashing lib dir is available on volume /lib-smashing.
Update advanced examples to demonstrate Marathon.json changes
- @rgcamus, author of smashing on docker)
- @frvi, original author of run.sh)
- @mattgruter, awesome contributions!
- @rowanu, Hotness Widget.
- @munkius, fork of Hotness Widget.
- @chelsea, Random Aww.
Distributed under the MIT license