Provide installation with docker

This commit is contained in:
Robert Schäfer 2018-10-19 23:06:59 +02:00
parent 21c17d6f9c
commit cbf83273fb
2 changed files with 47 additions and 0 deletions

18
Dockerfile Normal file
View File

@ -0,0 +1,18 @@
FROM node:10-alpine
LABEL Description="Server part of the social network Human Connection" Vendor="Human-Connection gGmbH" Version="0.0.1" Maintainer="Human-Connection gGmbH (developer@human-connection.org)"
# expose the app port
EXPOSE 4000
ARG WORKDIR=/HC-Server
RUN mkdir -p $WORKDIR
WORKDIR $WORKDIR
COPY package.json .
COPY yarn.lock .
RUN yarn install --production=false --frozen-lockfile --non-interactive
COPY . .
CMD ["yarn", "run", "start"]

29
docker-compose.yml Normal file
View File

@ -0,0 +1,29 @@
version: "3.7"
services:
server:
build: .
networks:
- hc-network
depends_on:
- neo4j
ports:
- 4000:4000
environment:
- NEO4J_URI=bolt://neo4j:7687
- GRAPHQL_LISTEN_PORT=4000
- GRAPHQL_URI=http://localhost:4000
- CLIENT_URI=http://localhost:3000
- JWT_SECRET=b/&&7b78BF&fv/Vd
- MOCK=false
neo4j:
image: neo4j:3.4
networks:
- hc-network
environment:
- NEO4J_AUTH=none
networks:
hc-network:
name: hc-network