version: "3.3"
services:
  flight_review_app:
    # image: px4flightreview
    build:
      context: ./app
      dockerfile: Dockerfile
    env_file: .env
    volumes:
      - ./data:/opt/data
      - ${PWD}/app/config_default.ini:/opt/service/config_default.ini:ro # Absolute for volume a file.
    restart: always
  nginx:
    build:
      context: ./nginx
      dockerfile: Dockerfile
      args:
        - NGINX_CONF=${NGINX_CONF}
    env_file: .env
    volumes:
      - /etc/localtime:/etc/localtime:ro # for synchronize with host timezone
    ports:
      - 80:80
      - 443:443
    links:
      - flight_review_app
    depends_on:
      - flight_review_app
    restart: always

