From 5448b5a271210e1a10a1ac55fcc96ec56377d404 Mon Sep 17 00:00:00 2001 From: roschaefer Date: Mon, 8 Jun 2020 11:56:43 +0200 Subject: [PATCH] Common base image strategy --- backend/Dockerfile | 1 + docker-compose.yml | 69 ++++++++++++++++++++++++++++++++++++++++++++++ fyphe_O | 2 +- neo4j/Dockerfile | 1 + webapp/Dockerfile | 2 ++ 5 files changed, 74 insertions(+), 1 deletion(-) create mode 100644 backend/Dockerfile create mode 100644 docker-compose.yml create mode 100644 neo4j/Dockerfile create mode 100644 webapp/Dockerfile diff --git a/backend/Dockerfile b/backend/Dockerfile new file mode 100644 index 0000000..e2bd079 --- /dev/null +++ b/backend/Dockerfile @@ -0,0 +1 @@ +FROM humanconnection/backend:build-and-test diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..2beb199 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,69 @@ +version: "3.4" + +services: + webapp: + image: schoolsinmotion/webapp:latest + build: + context: webapp + ports: + - 3000:3000 + - 3002:3002 + networks: + - hc-network + depends_on: + - backend + volumes: + - webapp_node_modules:/webapp/node_modules + environment: + - HOST=0.0.0.0 + - GRAPHQL_URI=http://backend:4000 + - MAPBOX_TOKEN="pk.eyJ1IjoiaHVtYW4tY29ubmVjdGlvbiIsImEiOiJjajl0cnBubGoweTVlM3VwZ2lzNTNud3ZtIn0.bZ8KK9l70omjXbEkkbHGsQ" + - PUBLIC_REGISTRATION=true + command: yarn run dev + backend: + image: schoolsinmotion/backend:latest + build: + context: backend + networks: + - hc-network + depends_on: + - neo4j + ports: + - 4000:4000 + volumes: + - backend_node_modules:/backend/node_modules + - uploads:/backend/public/uploads + environment: + - NEO4J_URI=bolt://neo4j:7687 + - GRAPHQL_URI=http://backend:4000 + - CLIENT_URI=http://localhost:3000 + - JWT_SECRET=b/&&7b78BF&fv/Vd + - MAPBOX_TOKEN=pk.eyJ1IjoiaHVtYW4tY29ubmVjdGlvbiIsImEiOiJjajl0cnBubGoweTVlM3VwZ2lzNTNud3ZtIn0.KZ8KK9l70omjXbEkkbHGsQ + - PRIVATE_KEY_PASSPHRASE=a7dsf78sadg87ad87sfagsadg78 + - "DEBUG=${DEBUG}" + - EMAIL_SUPPORT=support@human-connection.org + - EMAIL_DEFAULT_SENDER=info@human-connection.org + - PUBLIC_REGISTRATION=true + command: yarn run dev + neo4j: + image: schoolsinmotion/neo4j:latest + build: + context: neo4j + networks: + - hc-network + environment: + - NEO4J_AUTH=none + - NEO4J_dbms_security_procedures_unrestricted=algo.*,apoc.* + - NEO4J_ACCEPT_LICENSE_AGREEMENT=yes + ports: + - 7687:7687 + - 7474:7474 + volumes: + - neo4j_data:/data +networks: + hc-network: +volumes: + webapp_node_modules: + backend_node_modules: + neo4j_data: + uploads: diff --git a/fyphe_O b/fyphe_O index 36679da..fc26c00 160000 --- a/fyphe_O +++ b/fyphe_O @@ -1 +1 @@ -Subproject commit 36679da84dd59b60fa26e2de2be369cbc134cd1a +Subproject commit fc26c00c259b8e5a0b640233bf4b0b14c112de68 diff --git a/neo4j/Dockerfile b/neo4j/Dockerfile new file mode 100644 index 0000000..9e455d3 --- /dev/null +++ b/neo4j/Dockerfile @@ -0,0 +1 @@ +FROM humanconnection/neo4j:latest diff --git a/webapp/Dockerfile b/webapp/Dockerfile new file mode 100644 index 0000000..f638beb --- /dev/null +++ b/webapp/Dockerfile @@ -0,0 +1,2 @@ +FROM humanconnection/webapp:build-and-test +COPY static/ static/