Browse Source
analytics and server moved to separate containers, added docker-compose filepull/1/head
Evgeny Smyshlyaev
6 years ago
committed by
GitHub
9 changed files with 88 additions and 35 deletions
@ -1,29 +0,0 @@
|
||||
FROM python:3.6.6 |
||||
|
||||
EXPOSE 8000 |
||||
|
||||
VOLUME [ "/var/www/data" ] |
||||
|
||||
COPY . /var/www |
||||
|
||||
WORKDIR /var/www/analytics |
||||
|
||||
RUN pip install -r requirements.txt |
||||
|
||||
RUN apt-get update && apt-get install -y \ |
||||
apt-utils \ |
||||
gnupg \ |
||||
curl \ |
||||
python \ |
||||
make \ |
||||
g++ \ |
||||
git |
||||
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"] |
@ -0,0 +1,5 @@
|
||||
.git |
||||
npm-debug |
||||
node_modules |
||||
__pycache__ |
||||
.vscode |
@ -0,0 +1,20 @@
|
||||
FROM python:3.6.6 |
||||
|
||||
WORKDIR /var/www/analytics |
||||
|
||||
COPY ./requirements.txt /var/www/analytics |
||||
|
||||
RUN pip install -r requirements.txt \ |
||||
&& apt-get update && apt-get install -y \ |
||||
apt-utils \ |
||||
gnupg \ |
||||
curl \ |
||||
make \ |
||||
g++ \ |
||||
git |
||||
|
||||
VOLUME [ "/var/www/data" ] |
||||
|
||||
COPY . /var/www/analytics/ |
||||
|
||||
CMD ["python", "server.py"] |
@ -0,0 +1,19 @@
|
||||
version: '2' |
||||
services: |
||||
server: |
||||
image: hastic/server:latest |
||||
build: server |
||||
environment: |
||||
HASTIC_API_KEY: ${HASTIC_API_KEY} |
||||
ZMQ_CONNECTION_STRING: tcp://analytics:8002 |
||||
ports: |
||||
- 8000:8000 |
||||
volumes: |
||||
- data-volume:/var/www/data |
||||
|
||||
analytics: |
||||
image: hastic/analytics:latest |
||||
build: analytics |
||||
|
||||
volumes: |
||||
data-volume: |
@ -0,0 +1,26 @@
|
||||
FROM python:3.6.6 |
||||
|
||||
RUN apt-get install curl \ |
||||
bash \ |
||||
gnupg \ |
||||
make \ |
||||
g++ \ |
||||
&& curl -sL https://deb.nodesource.com/setup_8.x | bash - \ |
||||
&& apt-get update \ |
||||
&& apt-get install nodejs |
||||
|
||||
VOLUME [ "/var/www/data" ] |
||||
|
||||
WORKDIR /var/www/server |
||||
|
||||
COPY package.json /var/www/server |
||||
|
||||
RUN npm install |
||||
|
||||
COPY . /var/www/server |
||||
|
||||
RUN npm run build |
||||
|
||||
ENV INSIDE_DOCKER true |
||||
|
||||
CMD ["npm", "start"] |
Loading…
Reference in new issue