Files
egovframe-msa-edu/docker-compose/app/docker-compose.yml
2021-11-09 15:28:07 +09:00

139 lines
3.6 KiB
YAML

version: '3.2'
services:
rabbitmq:
container_name: rabbitmq
image: rabbitmq:management
ports:
- "5672:5672"
- "15672:15672"
restart: always
environment:
TZ: Asia/Seoul
zipkin:
container_name: zipkin
image: openzipkin/zipkin
ports:
- "9411:9411"
restart: always
environment:
TZ: Asia/Seoul
config:
container_name: config
image: egovframe/msa-edu-config:latest
ports:
- "8888:8888"
restart: always
volumes:
- ${HOME}/workspace.edu/egovframe-msa-edu/config:/usr/app/config # volume bind
environment:
SPRING_PROFILES_ACTIVE: native
ENCRYPT_KEY: token_secret
logstash_hostname: logstash:5001
SEARCH_LOCATION: file:///usr/app/config
RABBITMQ_HOSTNAME: rabbitmq
ZIPKIN_HOSTNAME: zipkin
TZ: Asia/Seoul
healthcheck:
test: curl -f http://localhost:8888/actuator/health || exit 1
interval: 10s
timeout: 1s
retries: 10
start_period: 30s
discovery:
container_name: discovery
image: egovframe/msa-discovery:latest
ports:
- "8761:8761"
restart: always
environment:
SPRING_PROFILES_ACTIVE: default
EUREKA_INSTANCE_HOSTNAME: discovery
TZ: Asia/Seoul
apigateway:
container_name: apigateway
image: egovframe/msa-apigateway:latest
ports:
- "8000:8000"
restart: always
volumes:
- ${HOME}/workspace:/usr/app/msa-attach-volume
environment:
SPRING_CLOUD_CONFIG_URI: http://config:8888
SPRING_PROFILES_ACTIVE: default
EUREKA_INSTANCE_HOSTNAME: discovery
RABBITMQ_HOSTNAME: rabbitmq
ZIPKIN_HOSTNAME: zipkin
TOKEN_SECRET: egovframe
APP_HOME: /usr/app
TZ: Asia/Seoul
depends_on:
config:
condition: service_healthy
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
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
EUREKA_INSTANCE_HOSTNAME: discovery
MESSAGES_DIRECTORY: /usr/app/msa-attach-volume/messages
APP_HOME: /usr/app
logstash_hostname: logstash:5001
MYSQL_HOSTNAME: mysql
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
EUREKA_INSTANCE_HOSTNAME: discovery
MESSAGES_DIRECTORY: /usr/app/msa-attach-volume/messages
APP_HOME: /usr/app
logstash_hostname: logstash:5001
MYSQL_HOSTNAME: mysql
TZ: Asia/Seoul
depends_on:
config:
condition: service_healthy
networks:
default:
external:
name: egov-network