SpeciesFileGroup/taxonworks

View on GitHub
.github/docker-tests/docker-compose.yml

Summary

Maintainability
Test Coverage
version: "2.1"
services:
  taxonworks:
    build: ./docker-image-taxonworks
    container_name: tw_container
    depends_on:
      db:
        condition: service_healthy
    ports:
      - "127.0.0.1:80:80" # local:docker
    links:
      - db
    environment:
      - RAILS_ENV=production
      - SERVER_NAME=localhost
      - POSTGRES_HOST=db
      - POSTGRES_DB=travis
      - POSTGRES_USER=travis
      - NGINX_SECRET_KEY=travis-nginx-secret
      - SECRET_KEY_BASE=93cd9bcf60b5f3550071463e28b25fb163e5b8ccb7c877900e5edfecab14871e082975a19f63db3540d3d38ce67f9ff59dd7dd6d3218500658b877f7d7d23dd7
      - TW_EXCEPTION_NOTIFICATION_EMAIL_PREFIX='"[TW-Error] "'
      - TW_EXCEPTION_NOTIFICATION_SENDER_ADDRESS='"\"notifier\" <notifier@example.com>"'
      - TW_EXCEPTION_RECIPIENTS=exceptions@example.com
      - TW_ACTION_MAILER_SMTP_SETTINGS_ADDRESS=smtp.example.com
      - TW_ACTION_MAILER_SMTP_SETTINGS_PORT=25
      - TW_ACTION_MAILER_SMTP_SETTINGS_DOMAIN=example.com
      - TW_ACTION_MAILER_URL_HOST=taxonworks
      - TW_MAIL_DOMAIN=example.com
      - TW_PATHS_STAGING=/staging
      - TW_PATHS_BACKUP=/backup
      - TW_SANDBOX_MODE=true
    healthcheck:
      test: ["CMD", "exe/docker_health_check.sh", "300", "80"]
      timeout: 305s
      interval: 10s
      retries: 3
  db:
    build:
      context: .
      dockerfile: "Dockerfile.postgres${PG_VERSION}"
    healthcheck:
      test: ["CMD", "pg_isready", "-U", "postgres", "-h", "db"]
      interval: 1s
      timeout: 3s
      retries: 30
  test:
    build: ./docker-image-test
    stdin_open: true
    tty: true
    depends_on:
      taxonworks:
        condition: service_healthy
    links:
      - taxonworks
    environment:
      - REVISION=${REVISION}