From c86236fd246388cfbffcf1034f2be34a595b109c Mon Sep 17 00:00:00 2001 From: ogerly Date: Thu, 11 Feb 2021 15:55:04 +0100 Subject: [PATCH] docker-compose and frontend update --- docker-compose.override.yml | 42 +++++++++++++++++++++ docker-compose.yml | 75 +++++++++++++++++++++++++++++++++++++ frontend | 2 +- 3 files changed, 118 insertions(+), 1 deletion(-) create mode 100644 docker-compose.override.yml create mode 100644 docker-compose.yml diff --git a/docker-compose.override.yml b/docker-compose.override.yml new file mode 100644 index 000000000..8e5a57be1 --- /dev/null +++ b/docker-compose.override.yml @@ -0,0 +1,42 @@ +version: "3.4" + +services: + ######################################################## + # FRONTEND ############################################# + ######################################################## + frontend: + image: gradido/frontend:development + build: + target: development + environment: + - NODE_ENV="development" + # - DEBUG=true + - NUXT_BUILD=/tmp/nuxt # avoid file permission issues when `rm -rf .nuxt/` + volumes: + # This makes sure the docker container has its own node modules. + # Therefore it is possible to have a different node version on the host machine + - frontend_node_modules:/app/node_modules + # bind the local folder to the docker to allow live reload + - ./frontend:/app + + ######################################################## + # BACKEND ############################################## + ######################################################## + #backend: + # image: ocelotsocialnetwork/backend:development + # build: + # target: development + # environment: + # - NODE_ENV="development" + # - DEBUG=true + # volumes: + # # This makes sure the docker container has its own node modules. + # # Therefore it is possible to have a different node version on the host machine + # - backend_node_modules:/app/node_modules + # # bind the local folder to the docker to allow live reload + # - ./backend:/app + + +volumes: + frontend_node_modules: + # backend_node_modules: \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 000000000..99da3f694 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,75 @@ +# This file defines the production settings. It is overwritten by docker-compose.override.yml, +# which defines the development settings. The override.yml is loaded by default. Therefore it +# is required to explicitly define if you want an production build: +# > docker-compose -f docker-compose.yml up + +version: "3.4" + +services: + ######################################################## + # FRONTEND ############################################# + ######################################################## + frontend: + image: gradido/frontend:latest + build: + context: ./frontend + target: production + networks: + - external-net + #depends_on: + # - backend + ports: + - 8080:8080 + environment: + # Envs used in Dockerfile + # - DOCKER_WORKDIR="/app" + # - PORT="8080" + - BUILD_DATE + - BUILD_VERSION + - BUILD_COMMIT + - NODE_ENV="production" + # Application only envs + #- HOST=0.0.0.0 # This is nuxt specific, alternative value is HOST=webapp + #env_file: + # - ./frontend/.env + + ######################################################### + ## BACKEND ############################################## + ######################################################### + #backend: + # image: ocelotsocialnetwork/backend:latest + # build: + # context: ./backend + # target: production + # networks: + # - external-net + # - internal-net + # depends_on: + # - neo4j + # ports: + # - 4000:4000 + # volumes: + # - backend_uploads:/app/public/uploads + # environment: + # # Envs used in Dockerfile + # # - DOCKER_WORKDIR="/app" + # # - PORT="4000" + # - BUILD_DATE + # - BUILD_VERSION + # - BUILD_COMMIT + # - NODE_ENV="production" + # # Application only envs + # - DEBUG=false + # - NEO4J_URI=bolt://neo4j:7687 + # - GRAPHQL_URI=http://backend:4000 + # - CLIENT_URI=http://webapp:3000 + # env_file: + # - ./backend/.env + +networks: + external-net: + internal-net: + internal: true + +# volumes: + \ No newline at end of file diff --git a/frontend b/frontend index 0261535ba..2e0b9d9aa 160000 --- a/frontend +++ b/frontend @@ -1 +1 @@ -Subproject commit 0261535ba4f607af25d7fd1157e253be14d8ef49 +Subproject commit 2e0b9d9aaabdf4bc9de3929d71b0902b7a32008a