version: '3.2'
services:
  userservice:
    container_name: userservice
    image: egovframe/msa-user-service:latest
    restart: always
    volumes:
      - ${HOME}/workspace:/usr/app/msa-attach-volume
    environment:
      SPRING_CLOUD_CONFIG_URI: http://config:8888
      SPRING_PROFILES_ACTIVE: default
      MESSAGES_DIRECTORY: /usr/app/msa-attach-volume/messages
      APP_HOME: /usr/app
      logstash_hostname: logstash:5001
      EUREKA_INSTANCE_HOSTNAME: discovery
      MYSQL_HOSTNAME: mysql
      RABBITMQ_HOSTNAME: rabbitmq
      ZIPKIN_HOSTNAME: zipkin
      TOKEN_SECRET: egovframe
      TZ: Asia/Seoul
    depends_on:
      config:
        condition: service_healthy

  boardservice:
    container_name: boardservice
    image: egovframe/msa-board-service:latest
    restart: always
    volumes:
      - ${HOME}/workspace:/usr/app/msa-attach-volume
    environment:
      SPRING_CLOUD_CONFIG_URI: http://config:8888
      SPRING_PROFILES_ACTIVE: default
      MESSAGES_DIRECTORY: /usr/app/msa-attach-volume/messages
      APP_HOME: /usr/app
      logstash_hostname: logstash:5001
      EUREKA_INSTANCE_HOSTNAME: discovery
      MYSQL_HOSTNAME: mysql
      RABBITMQ_HOSTNAME: rabbitmq
      ZIPKIN_HOSTNAME: zipkin
      TOKEN_SECRET: egovframe
      TZ: Asia/Seoul
    depends_on:
      config:
        condition: service_healthy

  portalservice:
    container_name: portalservice
    image: egovframe/msa-portal-service:latest
    restart: always
    volumes:
      - ${HOME}/workspace:/usr/app/msa-attach-volume
    environment:
      SPRING_CLOUD_CONFIG_URI: http://config:8888
      SPRING_PROFILES_ACTIVE: default
      MESSAGES_DIRECTORY: /usr/app/msa-attach-volume/messages
      APP_HOME: /usr/app
      logstash_hostname: logstash:5001
      EUREKA_INSTANCE_HOSTNAME: discovery
      MYSQL_HOSTNAME: mysql
      RABBITMQ_HOSTNAME: rabbitmq
      ZIPKIN_HOSTNAME: zipkin
      TOKEN_SECRET: egovframe
      TZ: Asia/Seoul
    depends_on:
      config:
        condition: service_healthy

networks:
  default:
    external:
      name: egov-network