docker-compose.yml 2.45 KB
Newer Older
1 2 3 4 5 6 7 8
version: '3'

services:
  php: &php-definition
    build: 
      context: .
      args:
        UID: ${PHP_FPM_USER:-1000}
9
    # uncomment and set your own image if needed
10
    image: ${IMAGE_PHP:-chill/activity-docs-person-report-task-php}:${VERSION:-latest}
11 12 13 14
    volumes:
      - .:/var/www/app
    environment: 
      - "COMPOSER_HOME=/var/www/app/.composer"
15 16
      - "APP_DEBUG=${APP_DEBUG:-true}"
      - "APP_ENV=${APP_ENV:-dev}"
17 18 19 20 21 22
      - "DATABASE_HOST=db"
      - "DATABASE_PORT=5432"
      - "DATABASE_NAME=postgres"
      - "DATABASE_USER=postgres"
      - "GELF_HOST=logstash"
      - "GELF_PORT=12201"
23 24
      - "PHP_FPM_USER=${PHP_FPM_USER:-1000}"
      - "PHP_FPM_GROUP=${PHP_FPM_GROUP:-1000}"
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
      # rabbitmq, deps for async upload
      - "RABBITMQ_HOST=rabbitmq"
      - "RABBITMQ_PORT=5672"
      - "RABBITMQ_USER=guest"
      - "RABBITMQ_PASSWORD=guest"
      - "RABBITMQ_VHOST=/"
      # openstack credentials, for async upload
      - "OS_USERNAME=${OS_USERNAME}"
      - "OS_PASSWORD=${OS_PASSWORD}"
      - "OS_REGION_NAME=${OS_REGION_NAME}"
      - "OS_AUTH_URL=${OS_AUTH_URL}"
      - "OS_TENANT_ID=${OS_TENANT_ID}"
      # configuration for async upload
      - "ASYNC_UPLOAD_TEMP_URL_BASE_PATH=${ASYNC_UPLOAD_TEMP_URL_BASE_PATH}"
      - "ASYNC_UPLOAD_TEMP_URL_CONTAINER=${ASYNC_UPLOAD_TEMP_URL_CONTAINER}"
      - "ASYNC_UPLOAD_TEMP_URL_KEY=${ASYNC_UPLOAD_TEMP_URL_KEY}"

42 43 44 45 46
    links:
      - db
      - redis
      - smtp
      - logstash
47
      - rabbitmq
48 49 50 51
  nginx:
    build:
      context: .
      dockerfile: docker/nginx/Dockerfile
52
    image: ${IMAGE_NGINX:-chill/activity-docs-person-report-task-nginx}:${VERSION:-latest}
53 54 55 56 57 58 59 60 61
    volumes:
      - .:/var/www/app
#      - ./docker/nginx/nginx.conf:/etc/nginx/nginx.conf
    links:
      - php
      - logstash
    ports:
      - "8001:80"
  db:
62
    image: postgres:9.6
63 64 65 66 67 68 69 70 71
    volumes:
      - ./docker/db/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
  redis:
    image: redis

  logstash:
    build:
      context: ./docker/logstash

72 73 74 75 76 77 78 79 80
  pgadmin:
    image: dpage/pgadmin4
    links:
      - db
    environment:
      - "PGADMIN_DEFAULT_EMAIL=${PGADMIN_DEFAULT_EMAIL:-admin@chill.social}"
      - "PGADMIN_DEFAULT_PASSWORD=${PGADMIN_DEFAULT_PASSWORD:-password}"
    ports:
      - "8002:80"
81 82
    volumes:
      - ./.pgadmin4:/var/lib/pgadmin
83 84 85 86 87 88 89

  rabbitmq:
    build:
      context: ./docker/message-queue
    ports:
      - "8004:15672"

90 91 92 93
# fake smtp server
  smtp:
    image: schickling/mailcatcher
    ports:
94
      - "8005:1080"
95