version: '3.6'
services:
  pricechecker:
    hostname: pricechecker
    image:  ${DOCKER_REGISTRY:-dockerregistry.artix.su:2443}/artix-pricechecker:${TAG:-latest}
    restart: always
    network_mode: host
    environment:
      - TZ=${SET_TIMEZONE:-UTC}
      - LANG=${LANG:-ru_RU.UTF-8}
      - LC_ALL=${LC_ALL:-ru_RU.UTF-8}
      - LOG_LEVEL=${LOG_LEVEL:-info}
      - LOG_FILE=${LOG_FILE:-main.log}
      - SERVER_PORT=${SERVER_PORT:-8085}
      - PC_LOG_LEVEL=${PC_LOG_LEVEL:-INFO}
      - SERVICE_ADDR=${SERVICE_ADDR:-172.17.0.1}
    volumes:
      - ./data:/usr/local/tomcat/data
      - ./logs:/usr/local/tomcat/logs
      - ./static:/usr/local/tomcat/static
      - /var/run/docker.sock:/var/run/docker.sock
      - ./cacert/rootCA.cer:/usr/local/tomcat/webapps/static/rootCA.cer

  nginx:
    image: nginx:1.24.0
    container_name: nginx_pricechecker
    restart: always
    volumes:
      - ./nginx/pricechecker.conf:/etc/nginx/conf.d/pricechecker.conf
      - ./certs:/etc/nginx/certs
    ports:
      - "443:443"
    depends_on:
      - pricechecker