diff --git a/.gitignore b/.gitignore index b6debd5..bdafef7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ data dist -config.json +config/config.json node_modules/ diff --git a/Dockerfile b/Dockerfile_analytics similarity index 100% rename from Dockerfile rename to Dockerfile_analytics diff --git a/Dockerfile_server b/Dockerfile_server new file mode 100644 index 0000000..44cd632 --- /dev/null +++ b/Dockerfile_server @@ -0,0 +1,29 @@ +FROM alpine:3.8 + +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"] diff --git a/config.example.json b/config/config.example.json similarity index 100% rename from config.example.json rename to config/config.example.json