version: "3.9"

services:
  web:
    build: .
    command: /home/app/photonicat/bin/docker-start.sh
    # volumes:
    #   - .:/app
    ports:
      - "3000:7000"
    tty: true
    restart: always
    links:
      - postgresql
      - redis
  
  postgresql:
    container_name: "photonicat_postgresql"
    image: postgres:9.5-alpine
    ports:
      - "5432"
    restart: always  
    environment:
      - POSTGRES_HOST_AUTH_METHOD=trust
    volumes:
      - ./data/postgresql:/var/lib/postgresql/data

  redis:
    container_name: "novotech_redis"
    image: redis:4-alpine
    restart: always
    ports:
      - "6379"
    volumes:
      - ./data/redis:/data
      - ./etc/redis.conf:/etc/redis.conf
    command: redis-server /etc/redis.conf
