<commit_before>version: '3.2'
services:

  web:
    restart: always
    build: ./enrolment-ui/
    env_file: .env
    volumes: 
      - web-data:/data/web
    depends_on:
      - api

  api:
    restart: always
    build: ./enrolment-service/
    expose:
      - "8000"
    volumes: 
      - api-data:/data/api
      - ./presisted_data/logs/django:/var/log/gunicorn
    env_file: .env
    entrypoint: /entrypoint.sh 
    depends_on:
      - postgres

  nginx:
    restart: always
    build: ./nginx/
    ports:
      - "8443:8080"
      - "8000:8000"
    volumes: 
      - type: volume
        source: web-data
        target: /data/web
        read_only: true
      - type: volume
        source: api-data
        target: /data/api
        read_only: true
      - ./presisted_data/logs/nginx:/var/log/nginx
      - ./nginx/ssl:/etc/ssl
    depends_on:
      - web
      - api

  postgres:
    restart: always
    image: postgres:10.1
    volumes:
      - ./postgres/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
      - ./presisted_data/postgresql:/var/lib/postgresql/data
    env_file: .env
    expose:
      - "5432"

volumes:
  web-data:
  api-data:<commit_msg>Changed the bind mounts for SSL certs and renamed 'presisted_data' to 'persistent_data'<commit_after>version: '3.2'
services:

  web:
    restart: always
    build: ./enrolment-ui/
    env_file: .env
    volumes: 
      - web-data:/data/web
    depends_on:
      - api

  api:
    restart: always
    build: ./enrolment-service/
    expose:
      - "8000"
    volumes: 
      - api-data:/data/api
      - ./persistent_data/logs/django:/var/log/gunicorn
    env_file: .env
    entrypoint: /entrypoint.sh 
    depends_on:
      - postgres

  nginx:
    restart: always
    build: ./nginx/
    ports:
      - "8443:8080"
      - "8000:8000"
    volumes: 
      - type: volume
        source: web-data
        target: /data/web
        read_only: true
      - type: volume
        source: api-data
        target: /data/api
        read_only: true
      - ./persistent_data/logs/nginx:/var/log/nginx
      - /etc/ssl/certs/cancercollaboratory.org.crt:/etc/ssl/domain.cert
      - /etc/ssl/private/cancercollaboratory.org.key:/etc/ssl/domain.key      
    depends_on:
      - web
      - api

  postgres:
    restart: always
    image: postgres:10.1
    volumes:
      - ./postgres/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
      - ./persistent_data/postgresql:/var/lib/postgresql/data
    env_file: .env
    expose:
      - "5432"

volumes:
  web-data:
  api-data:
{'fraction_non_alphanumeric': 0.12367491166077739, 'fraction_numerical': 0.022771888496270123, 'mean_word_length': 1.793859649122807, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5729298', 'n_tokens_mistral': 974, 'n_tokens_neox': 921, 'n_words': 161}