amper43
6 years ago
6 changed files with 50 additions and 18 deletions
@ -1,23 +1,23 @@
|
||||
FROM alpine:3.8 |
||||
|
||||
EXPOSE 8000 |
||||
FROM python:3.6.6 |
||||
|
||||
VOLUME [ "/var/www/data" ] |
||||
|
||||
COPY server config /var/www |
||||
COPY server /var/www/ |
||||
|
||||
WORKDIR /var/www/server |
||||
|
||||
#RUN apt-get update && apt-get install -y \ |
||||
# gnupg \ |
||||
# curl \ |
||||
# make \ |
||||
# g++ |
||||
RUN apt-get install curl \ |
||||
bash \ |
||||
gnupg \ |
||||
curl \ |
||||
make \ |
||||
g++ \ |
||||
&& curl -sL https://deb.nodesource.com/setup_8.x | bash - \ |
||||
&& apt-get update \ |
||||
&& apt-get install nodejs \ |
||||
&& npm install \ |
||||
&& npm run build |
||||
|
||||
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - && |
||||
apt-get update && |
||||
apt-get install -y nodejs && |
||||
npm install && |
||||
npm run build |
||||
ENV INSIDE_DOCKER true |
||||
|
||||
CMD ["npm", "start"] |
||||
|
@ -0,0 +1,9 @@
|
||||
.PHONY: server analytics |
||||
|
||||
server: |
||||
docker build . -f Dockerfile_server
|
||||
|
||||
analytics: |
||||
docker build . -f Dockerfile_analytics
|
||||
|
||||
all: server analytics |
@ -0,0 +1,23 @@
|
||||
version: '3' |
||||
services: |
||||
server: |
||||
build: |
||||
dockerfile: Dockerfile_server |
||||
volumes: |
||||
- "/var/www/data" |
||||
ports: |
||||
- data-volume:"8000:8000" |
||||
privileged: true |
||||
ipc: host |
||||
analytics: |
||||
build: |
||||
dockerfile: Dockerfile_analytics |
||||
volumes: |
||||
- data-volume:"/var/www/data" |
||||
ports: |
||||
- "8002:8002" |
||||
privileged: true |
||||
ipc: host |
||||
|
||||
volumes: |
||||
data-volume: |
Loading…
Reference in new issue