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 EXPOSE 8000
VOLUME [ "/var/www/data/anomalies", "/var/www/data/datasets", "/var/www/data/metrics", "/var/www/data/models", "/var/www/data/segments" ] VOLUME [ \
"/var/www/data/analytic_units", \
RUN pip install pandas "/var/www/data/datasets", \
RUN pip install seglearn "/var/www/data/metrics", \
RUN pip install scipy "/var/www/data/models", \
RUN pip install tsfresh "/var/www/data/segments" \
]
COPY . /var/www 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 \ RUN apt-get update && apt-get install -y \
apt-utils \ apt-utils \
@ -21,10 +24,12 @@ RUN apt-get update && apt-get install -y \
make \ make \
g++ \ g++ \
git 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 RUN apt-get update && apt-get install -y nodejs
WORKDIR /var/www/server
RUN npm install && npm run build RUN npm install && npm run build
CMD ["npm", "start"] CMD ["npm", "start"]

8
README.md

@ -94,7 +94,13 @@ docker build -t hastic-server .
#### Run #### Run
```bash ```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 ### Changelog

Loading…
Cancel
Save