version: '3'

services:
  nginx:
    image: nginx:alpine
    ports:
      - "127.0.0.1:${INTERNAL_NGINX_PORT}:8080"
    restart: always
    links:
      - phpsv
      - translate
    depends_on:
      - phpsv
    volumes:
      - ./config/nginx-site.conf:/etc/nginx/conf.d/default.conf
      - ./src/subtitulamos/public:/code/public:cached

  phpsv:
    build:
      context: .
      dockerfile: Dockerfile.PHP
    working_dir: /code
    restart: always
    links:
      - redis
      - sonic
    depends_on:
      - sonic
    volumes:
      - ./.env:/code/.env
      - /var/run/mysqld/mysqld.sock:/var/run/mysqld/mysqld.sock

  redis:
    image: redis:6.0-alpine
    volumes:
      - ./data/redis:/data

  sonic:
    image: valeriansaliou/sonic:v1.3.0
    restart: always
    volumes:
      - ./data/sonic:/var/lib/sonic/store/
      - ./config/sonic.cfg:/etc/sonic.cfg

  translate:
    restart: always
    build:
      context: .
      dockerfile: Dockerfile.Go
      args:
        REDIS_PUBSUB_ENV: ${ENVIRONMENT_NAME}
    links:
      - redis

version: "3"

services:
  nginx:
    image: nginx:alpine
    ports:
      - "127.0.0.1:${INTERNAL_NGINX_PORT}:8080"
    restart: always
    links:
      - phpsv
      - translate
    depends_on:
      - phpsv
    volumes:
      - ./config/nginx-site.conf:/etc/nginx/conf.d/default.conf
      - ./src/subtitulamos/public:/code/public:cached
    logging:
      options:
        max-size: "600m"
        max-file: "3"

  phpsv:
    build:
      context: .
      dockerfile: Dockerfile.PHP
    working_dir: /code
    restart: always
    links:
      - redis
      - sonic
    depends_on:
      - sonic
    volumes:
      - ./.env:/code/.env
      - /var/run/mysqld/mysqld.sock:/var/run/mysqld/mysqld.sock
    logging:
      options:
        max-size: "400m"
        max-file: "3"

  redis:
    image: redis:6.0-alpine
    volumes:
      - ./data/redis:/data

  sonic:
    image: valeriansaliou/sonic:v1.3.0
    restart: always
    volumes:
      - ./data/sonic:/var/lib/sonic/store/
      - ./config/sonic.cfg:/etc/sonic.cfg

  translate:
    restart: always
    build:
      context: .
      dockerfile: Dockerfile.Go
      args:
        REDIS_PUBSUB_ENV: ${ENVIRONMENT_NAME}
    links:
      - redis
    logging:
      options:
        max-size: "100m"
        max-file: "3"

Add restrictions to Docker log filesizes
Add restrictions to Docker log filesizes
