docker-services.yml

Summary

Maintainability
Test Coverage
version: '2'
services:
  base_app:
    build: .
    volumes:
      # Note that we're storing our Python and Node dependencies
      # in separate volumes, outside of the Docker Host's filesystem.
      # This is done to ensure that the Linux-based shared libraries
      # in these directories won't get mixed up with Darwin or
      # other non-Linux native code compiled on the Docker Host.
      - python-venv:/venv/
      - node-modules:/calc/node_modules/
      - home:/home/
    environment:
      - DDM_VENV_DIR=/venv
      - DDM_USER_OWNED_DIRS=/venv:/calc/node_modules
      - DDM_HOST_USER=calc_user
      - NPM_CONFIG_ENGINE_STRICT=true
      - PYTHONUNBUFFERED=yup
      - DATABASE_URL=postgres://calc_user@db/calc
      - REDIS_URL=redis://redis:6379/0
      - REDIS_TEST_URL=redis://redis:6379/1
      # This *must* be at least 2 in order for the fake authentication
      # server to work, as it makes the app connect to itself (which will
      # cause the app to hang if only one worker exists).
      - WEB_CONCURRENCY=2
    mem_limit: 1G
    memswap_limit: 0