Ocelot-Social/docker-compose.yml
Ulf Gebhardt 2518e38582
- webapp Dockerfile
- cleanup backend Dockerfile
- docker-compose cleanup
- docker-compose networks
- docker-compose for production, docker-compose.override for development
- security
- todos
2021-01-19 23:18:52 +01:00

99 lines
2.9 KiB
YAML

# 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:
########################################################
# WEBAPP ###############################################
########################################################
webapp:
image: ocelotsocialnetwork/webapp:latest
build:
context: ./webapp
target: production
networks:
- external-net
depends_on:
- backend
ports:
- 3000:3000
# Storybook: Todo externalize, its not working anyways
# - 3002:3002
environment:
# Envs used in Dockerfile
# - DOCKER_WORKDIR="/app"
# - PORT="3000"
- BUILD_DATE
- BUILD_VERSION
- BUILD_COMMIT
- NODE_ENV="development"
# Application only envs
- HOST=0.0.0.0 # This is nuxt specific, alternative value is HOST=webapp
- GRAPHQL_URI=http://backend:4000
env_file:
- ./webapp/.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="development"
# 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/neo4j:latest
build:
context: ./neo4j
networks:
- internal-net
environment:
# TODO: This sounds scary for a production environment
- NEO4J_AUTH=none
- NEO4J_dbms_security_procedures_unrestricted=algo.*,apoc.*
# Uncomment following line for Neo4j Enterprise version instead of Community version
# TODO: clarify if that is the only thing needed to unlock the Enterprise version
# - NEO4J_ACCEPT_LICENSE_AGREEMENT=yes
# TODO: Remove the playground from production
ports:
- 7687:7687
volumes:
- neo4j_data:/data
networks:
external-net:
internal-net:
internal: true
volumes:
backend_uploads:
neo4j_data: