Browse Source

WIP: Docker file after 0.12 alpha release #35 (#99)

* Make Dockerfile use requirements.txt

* anomalies directory -> analytic_units

* /tmp volume

* Update docs

* Remove /tmp volume

* Volumes in multiple lines
pull/1/head
rozetko 6 years ago committed by Alexey Velikiy
parent
commit
9825a1f18f
  1. 21
      Dockerfile
  2. 8
      README.md

21
Dockerfile

@ -2,16 +2,19 @@ FROM python:3
EXPOSE 8000
VOLUME [ "/var/www/data/anomalies", "/var/www/data/datasets", "/var/www/data/metrics", "/var/www/data/models", "/var/www/data/segments" ]
RUN pip install pandas
RUN pip install seglearn
RUN pip install scipy
RUN pip install tsfresh
VOLUME [ \
"/var/www/data/analytic_units", \
"/var/www/data/datasets", \
"/var/www/data/metrics", \
"/var/www/data/models", \
"/var/www/data/segments" \
]
COPY . /var/www
WORKDIR /var/www/server
WORKDIR /var/www/analytics
RUN pip install -r requirements.txt
RUN apt-get update && apt-get install -y \
apt-utils \
@ -21,10 +24,12 @@ RUN apt-get update && apt-get install -y \
make \
g++ \
git
RUN curl -sL https://deb.nodesource.com/setup_9.x | bash -
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash -
RUN apt-get update && apt-get install -y nodejs
WORKDIR /var/www/server
RUN npm install && npm run build
CMD ["npm", "start"]

8
README.md

@ -94,7 +94,13 @@ docker build -t hastic-server .
#### Run
```bash
docker run -d --name hastic-server -p 80:8000 -e HASTIC_API_KEY=<your_grafana_api_key> hastic-server
docker run -d \
--name hastic-server \
--ipc host \
-p 80:8000 \
-e HASTIC_API_KEY=<your_grafana_api_key> \
-v /tmp:/tmp \
hastic-server
```
### Changelog

Loading…
Cancel
Save