Browse Source

133-dockerize-hastic-server

pull/1/head
rozetko 7 years ago
parent
commit
fb26ff802d
  1. 30
      Dockerfile
  2. 22
      README.md

30
Dockerfile

@ -0,0 +1,30 @@
FROM python:3
EXPOSE 8000
VOLUME [ "/var/www/src/anomalies", "/var/www/src/datasets", "/var/www/src/metrics", "/var/www/src/models", "/var/www/src/segments" ]
RUN pip install pandas
RUN pip install seglearn
RUN pip install scipy
RUN pip install fbprophet
COPY . /var/www
WORKDIR /var/www/server
RUN apt-get update && apt-get install -y \
apt-utils \
gnupg \
curl \
python \
make \
g++ \
git
RUN curl -sL https://deb.nodesource.com/setup_9.x | bash -
RUN apt-get update && apt-get install -y nodejs
RUN npm install && npm run build
CMD ["npm", "start"]

22
README.md

@ -1,29 +1,17 @@
# Hastic server # Hastic server
Implementation of basic pattern recognition and unsupervised learning for anomamaly detection. Implementation of basic pattern recognition and unsupervised learning for anomaly detection.
Implementation of analytic unit for Hastic. Implementation of analytic unit for Hastic.
see [REST API](REST.md) see [REST API](REST.md)
## Build & run ## Build & run
### Analytic unit ### Docker
Python3 project Example running hastic-server in Docker:
``` ```
pip3 install pandas docker build -t hastic-server .
pip3 install influxdb docker run -d --name hastic-server -p 80:8000 -e API_KEY=<your_grafana_api_key> hastic-server
```
### Server
Node.js project
```
cd server
npm install
npm run build
npm start
``` ```

Loading…
Cancel
Save