MetaPhase-Consulting/State-TalentMAP-API

View on GitHub
docker-compose-api-only.yml

Summary

Maintainability
Test Coverage
version: '2'
services:
  app:
    build:
      context: .
    links:
      - oracle
    depends_on:
      - oracle
    deploy:
      replicas: ${REPLICAS-1}
    # use this to run in https server locally
    # command: python manage.py runsslserver --certificate /app/talentmap_api/sp.crt --key /app/talentmap_api/sp.key 0.0.0.0:8000
    command: >
      bash -c "python show_logo.py
      && echo 'Starting...'
      && ./wait-for-oracle.sh oracle:1521/oraclesid sys oraclepwd 'as sysdba'
      && ./create-oracle-user.sh oracle:1521/oraclesid sys oraclepwd 'as sysdba'
      && ./wait-for-oracle.sh oracle:1521/oraclepdb talentmap1 talentmap1 '' true
      && python manage.py runserver 0.0.0.0:8000"
    volumes:
      - .:/app:delegated
    environment:
      - DJANGO_SECRET_KEY=development_secret_key
      - DATABASE_URL=oracle:1521/oraclepdb
      - DATABASE_USER=talentmap1
      - DATABASE_PW=talentmap1
      - DJANGO_DEBUG=true
      - WS_ROOT_API_URL=http://host.docker.internal:3333
      - BACKOFFICE_CRUD_URL=http://host.docker.internal:3333/v1/backoffice/BackOfficeCRUD
      - EMPLOYEES_API_URL=http://host.docker.internal:3333/v1/Employees
      - SECREF_URL=http://host.docker.internal:3333/v2/SECREF
      - CP_API_URL=http://host.docker.internal:3333/v1/cyclePositions
      - CP_API_V2_URL=http://host.docker.internal:3333/v2/cyclePositions
      - PV_API_URL=http://host.docker.internal:3333/v1/futureVacancies
      - PV_API_V2_URL=http://host.docker.internal:3333/v2/futureVacancies
      - PV_API_V3_URL=http://host.docker.internal:3333/v3/futureVacancies
      - ORG_API_URL=http://host.docker.internal:3333/v1/Organizations
      - CLIENTS_API_URL=http://host.docker.internal:3333/v1/Clients
      - CLIENTS_API_V2_URL=http://host.docker.internal:3333/v2/clients
      - TP_API_URL=http://host.docker.internal:3333/v1/TrackingPrograms
      - AGENDA_API_URL=http://host.docker.internal:3333/v1/Agendas
      - PANEL_API_URL=http://host.docker.internal:3333/v1/panels
      - PERSON_API_URL=http://host.docker.internal:3333/v3/persons
      - BIDS_API_V2_URL=http://host.docker.internal:3333/v2/bids
      - POSITIONS_API_URL=http://host.docker.internal:3333/v1/positions
      - POSITIONS_API_V2_URL=http://host.docker.internal:3333/v2/positions
      - PUBLISHABLE_POSITIONS_API_URL=http://host.docker.internal:3333/v1/publishablePositions
      - EMAIL_ENABLED=true
      - EMAIL_HOST=host.docker.internal
      - EMAIL_PORT=1025
      - EMAIL_HOST_USER=${EMAIL_HOST_USER}
      - EMAIL_HOST_PASSWORD=${EMAIL_HOST_PASSWORD}
      - EMAIL_FROM_ADDRESS=talentmap-alert@local.dev
      - EMAIL_USE_TLS=false
      - EMAIL_IS_DEV=false
      - EMAIL_DEV_TO=${EMAIL_DEV_TO}
  haproxy:
    image: eeacms/haproxy
    depends_on:
    - app
    ports:
    - "8000:5000"
    - "1936:1936"
    environment:
      BACKENDS: "app"
      BACKENDS_PORT: "8000"
      DNS_ENABLED: "true"
      LOG_LEVEL: "info"
  oracle:
    ports:
        - 1521:1521
    image: mjoyce91/oracle193db:fast
    volumes:
      - oracle:/var/lib/oracle/data/:delegated
  maildev:
    image: maildev/maildev
    ports:
      - "1080:80"
      - "1025:25"
volumes:
  pgdata:
  oracle: