# 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 ############################################# ######################################################## webapp: image: ocelotsocialnetwork/develop-webapp:latest build: context: webapp target: production args: - "BUILD_COMMIT=${TRAVIS_COMMIT}" ports: - 3000:3000 - 3002:3002 networks: - hc-network depends_on: - backend volumes: - ./webapp:/develop-webapp - webapp_node_modules:/develop-webapp/node_modules environment: - HOST=0.0.0.0 - GRAPHQL_URI=http://backend:4000 - MAPBOX_TOKEN="pk.eyJ1IjoiYnVzZmFrdG9yIiwiYSI6ImNraDNiM3JxcDBhaWQydG1uczhpZWtpOW4ifQ.7TNRTO-o9aK1Y6MyW_Nd4g" ######################################################## # BACKEND ############################################## ######################################################## backend: image: ocelotsocialnetwork/backend:latest build: context: ./backend target: production networks: - hc-network depends_on: - neo4j ports: - 4000:4000 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 - uploads:/app/public/uploads environment: # Envs used in Dockerfile # - DOCKER_WORKDIR="/app" - BUILD_DATE - BUILD_VERSION - BUILD_COMMIT - NODE_ENV="development" - PORT # Application only envs - DEBUG=false - NEO4J_URI=bolt://neo4j:7687 - GRAPHQL_URI=http://backend:4000 - CLIENT_URI=http://webapp:3000 env_file: - ./backend/.env ######################################################## # Neo4J ################################################ ######################################################## neo4j: image: ocelotsocialnetwork/develop-neo4j:latest build: context: ./neo4j networks: - hc-network environment: - NEO4J_AUTH=none - NEO4J_dbms_security_procedures_unrestricted=algo.*,apoc.* # decomment following line for Neo4j Enterprice version instead of Community version # - 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: