From 0a6c222a95cddb92f04c6c0dce093be58ddd8063 Mon Sep 17 00:00:00 2001 From: roschaefer Date: Mon, 8 Jun 2020 14:17:47 +0200 Subject: [PATCH] Configure Github actions to build base images --- .github/workflows/cd.yml | 40 ++++++++++++++++++++++++++++++++-------- .gitmodules | 3 +++ Human-Connection | 1 + docker-compose.yml | 18 ------------------ 4 files changed, 36 insertions(+), 26 deletions(-) create mode 160000 Human-Connection diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index fdb6c40..1e13091 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -13,29 +13,53 @@ jobs: uses: actions/checkout@v2 with: submodules: recursive - - name: Rebrand - run: cp -r webapp/* fyphe_O/webapp/ - - name: Build neo4j + + - name: Build neo4j base image + uses: docker/build-push-action@v1.1.0 + with: + repository: humanconnection/neo4j + tags: latest + path: Human-Connection/neo4j/ + push: false + - name: Build backend base image + uses: docker/build-push-action@v1.1.0 + with: + repository: humanconnection/backend + tags: latest + path: Human-Connection/backend/ + push: false + - name: Build webapp base image + uses: docker/build-push-action@v1.1.0 + with: + repository: humanconnection/webapp + tags: latest + path: Human-Connection/webapp/ + push: false + + - name: Build neo4j customized image uses: docker/build-push-action@v1.1.0 with: repository: schoolsinmotion/neo4j username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} tags: latest - path: fyphe_O/neo4j/ - - name: Build backend + path: neo4j/ + push: true + - name: Build backend customized image uses: docker/build-push-action@v1.1.0 with: repository: schoolsinmotion/backend username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} tags: latest - path: fyphe_O/backend/ - - name: Build webapp + path: backend/ + push: true + - name: Build webapp customized image uses: docker/build-push-action@v1.1.0 with: repository: schoolsinmotion/webapp username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} tags: latest - path: fyphe_O/webapp/ + path: webapp/ + push: true diff --git a/.gitmodules b/.gitmodules index e69de29..518958a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "Human-Connection"] + path = Human-Connection + url = https://github.com/The-Schools-in-Motion-Network/fyphe_O.git diff --git a/Human-Connection b/Human-Connection new file mode 160000 index 0000000..73c1f3c --- /dev/null +++ b/Human-Connection @@ -0,0 +1 @@ +Subproject commit 73c1f3c88bd13ecfd520b76bb396e4ec460f9d79 diff --git a/docker-compose.yml b/docker-compose.yml index 2beb199..7aaffeb 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,8 +3,6 @@ version: "3.4" services: webapp: image: schoolsinmotion/webapp:latest - build: - context: webapp ports: - 3000:3000 - 3002:3002 @@ -12,8 +10,6 @@ services: - hc-network depends_on: - backend - volumes: - - webapp_node_modules:/webapp/node_modules environment: - HOST=0.0.0.0 - GRAPHQL_URI=http://backend:4000 @@ -22,17 +18,12 @@ services: 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 @@ -47,8 +38,6 @@ services: command: yarn run dev neo4j: image: schoolsinmotion/neo4j:latest - build: - context: neo4j networks: - hc-network environment: @@ -58,12 +47,5 @@ services: ports: - 7687:7687 - 7474:7474 - volumes: - - neo4j_data:/data networks: hc-network: -volumes: - webapp_node_modules: - backend_node_modules: - neo4j_data: - uploads: