version: "3.4"

services:
  # red:
  #   image: "nodered/node-red"
  #   volumes:
  #     - "./red_data:/data:rw"
  #   environment:
  #     - PORT=${NODE_RED_PORT}
  #     - DJANGO_URL=http://localhost:${EVERYTHING_EXTERNAL_PORT}/api
  #   network_mode: host
  #   # env_file:
  #   #   - .env
  # hivemq:
  #   image: "docker.briq.it/public/hivemq-community-edition:master"
  #   # env_file:
  #   #   - .env
  #   volumes:
  #     - ./hivemq.config.xml:/config.xml
  #   ports:
  #     - "${EVERYTHING_LISTEN}:${MQTT_PORT}:1833"
  #     - "${EVERYTHING_LISTEN}:${MQTT_WEBSOCKET_PORT}:1834"
  sangue:
    image: sangue
    build:
      context: ../..
      args:
        GIT_COMMIT_SHA: ${GIT_COMMIT_SHA}
        GIT_COMMIT_DATE: ${GIT_COMMIT_DATE}
        GIT_COMMIT_REF: ${GIT_COMMIT_REF}
        GIT_CLEAN: ${GIT_CLEAN}
    container_name: "sangue"
    restart: unless-stopped
    volumes:
      - /etc/timezone:/etc/timezone:ro
      - ./.django_uploads:/django_upload
    env_file:
      - .env
    ports:
      - "127.0.0.1:${EVERYTHING_EXTERNAL_PORT}:${EVERYTHING_PORT}"
  redis:
    image: redis:6
    restart: unless-stopped
  psql_relay:
    image: docker.briq.it/public/psql_relay:master
    environment:
      - PSQL_SOCK_NAME=postgresql/.s.PGSQL.5432
    volumes: 
      - /var/run/:/psql_sock/
    restart: unless-stopped


  # cupsd:
  #   image: "docker.briq.it/public/cupsd:master"
  #   volumes:
  #     - /etc/timezone:/etc/timezone:ro
  #     - ./.cups_sock:/run/cups/
  #     - ./.cups_config/:/etc/cups/
  #   ports:
  #     - "1631:631"
