Skip to content

Added a Dockerfile and hooked into build system #227

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Pull base image.
FROM iojs
MAINTAINER Tim Ehlers <[email protected]>

# Copy files
COPY src /opt/head/src
COPY _site /opt/head/_site
COPY *json /opt/head/
COPY *.js /opt/head/
COPY LICENCE /opt/head/LICENCE
COPY index.html /opt/head/index.html

# Define working directory.
WORKDIR /opt/head

RUN npm install -g grunt-cli
RUN npm install


ADD scripts/run.sh /run.sh
CMD ["/run.sh"]
1 change: 1 addition & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ module.exports = function(grunt) {
options: {
port: 9100,
base: '.',
hostname: 'localhost',
keepalive: true
}
}
Expand Down
4 changes: 4 additions & 0 deletions README.textile
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ h5. Running from the filesystem

elastisearch-head is a standalone webapp written in good-ol' html5. This means, you can put it up on any webserver, run it directly from the filesystem, use it on an ipad, or put it on a floppy disk and carry it with you.

h5. Running from Docker
* enable "cors":http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-http.html by add @http.cors.enabled: true@ in elasticsearch configuration
* docker run -d --name=elasticsearch-head -p 9100:9100 ehlers320/elasticsearch-head

h4. URL Parameters

Parameters may be appended to the url set some initial state eg. @head/index.html?base_uri=http://node-01.example.com:9200@
Expand Down
4 changes: 4 additions & 0 deletions scripts/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
sed -i "s/localhost/0.0.0.0/g" /opt/head/Gruntfile.js
cd /opt/head
grunt server