✅ Test docker compose
This commit is contained in:
@@ -2,6 +2,8 @@
|
|||||||
# base image - openjdk8
|
# base image - openjdk8
|
||||||
FROM openjdk:8-jre-alpine
|
FROM openjdk:8-jre-alpine
|
||||||
|
|
||||||
|
# curl(healthcheck)
|
||||||
|
RUN apk --no-cache add curl
|
||||||
# directory 생성
|
# directory 생성
|
||||||
RUN mkdir -p /usr/app/config
|
RUN mkdir -p /usr/app/config
|
||||||
# jar 파일이 복사되는 위치
|
# jar 파일이 복사되는 위치
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ spring:
|
|||||||
search-locations: ${search.location:file:///${user.home}/workspace.edu/egovframe-msa-edu/config} # Windows
|
search-locations: ${search.location:file:///${user.home}/workspace.edu/egovframe-msa-edu/config} # Windows
|
||||||
# search-locations: file://${user.home}/workspace.edu/egovframe-msa-edu/config # MacOS
|
# search-locations: file://${user.home}/workspace.edu/egovframe-msa-edu/config # MacOS
|
||||||
rabbitmq:
|
rabbitmq:
|
||||||
host: localhost
|
host: ${rabbitmq.hostname:localhost}
|
||||||
port: 5672
|
port: 5672
|
||||||
username: guest
|
username: guest
|
||||||
password: guest
|
password: guest
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
version: '3'
|
version: '3.2'
|
||||||
services:
|
services:
|
||||||
rabbitmq:
|
rabbitmq:
|
||||||
container_name: rabbitmq
|
container_name: rabbitmq
|
||||||
@@ -28,12 +28,19 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- ${HOME}/workspace.edu/egovframe-msa-edu/config:/usr/app/config # volume bind
|
- ${HOME}/workspace.edu/egovframe-msa-edu/config:/usr/app/config # volume bind
|
||||||
environment:
|
environment:
|
||||||
ENCRYPT_KEY: token_secret
|
|
||||||
SPRING_PROFILES_ACTIVE: native
|
SPRING_PROFILES_ACTIVE: native
|
||||||
# logstash_hostname: logstash:5001
|
ENCRYPT_KEY: token_secret
|
||||||
|
logstash_hostname: logstash:5001
|
||||||
|
SEARCH_LOCATION: file:///usr/app/config
|
||||||
RABBITMQ_HOSTNAME: rabbitmq
|
RABBITMQ_HOSTNAME: rabbitmq
|
||||||
ZIPKIN_HOSTNAME: zipkin
|
ZIPKIN_HOSTNAME: zipkin
|
||||||
TZ: Asia/Seoul
|
TZ: Asia/Seoul
|
||||||
|
healthcheck:
|
||||||
|
test: curl -f http://localhost:8888/actuator/health || exit 1
|
||||||
|
interval: 10s
|
||||||
|
timeout: 1s
|
||||||
|
retries: 10
|
||||||
|
start_period: 30s
|
||||||
|
|
||||||
discovery:
|
discovery:
|
||||||
container_name: discovery
|
container_name: discovery
|
||||||
@@ -51,7 +58,7 @@ services:
|
|||||||
image: egovframe/msa-apigateway:latest
|
image: egovframe/msa-apigateway:latest
|
||||||
ports:
|
ports:
|
||||||
- "8000:8000"
|
- "8000:8000"
|
||||||
restart: on-failure
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
- ${HOME}/workspace:/usr/app/msa-attach-volume
|
- ${HOME}/workspace:/usr/app/msa-attach-volume
|
||||||
environment:
|
environment:
|
||||||
@@ -60,25 +67,33 @@ services:
|
|||||||
EUREKA_INSTANCE_HOSTNAME: discovery
|
EUREKA_INSTANCE_HOSTNAME: discovery
|
||||||
RABBITMQ_HOSTNAME: rabbitmq
|
RABBITMQ_HOSTNAME: rabbitmq
|
||||||
ZIPKIN_HOSTNAME: zipkin
|
ZIPKIN_HOSTNAME: zipkin
|
||||||
|
TOKEN_SECRET: egovframe
|
||||||
APP_HOME: /usr/app
|
APP_HOME: /usr/app
|
||||||
TZ: Asia/Seoul
|
TZ: Asia/Seoul
|
||||||
|
depends_on:
|
||||||
|
config:
|
||||||
|
condition: service_healthy
|
||||||
|
|
||||||
userservice:
|
userservice:
|
||||||
container_name: userservice
|
container_name: userservice
|
||||||
image: egovframe/msa-user-service:latest
|
image: egovframe/msa-user-service:latest
|
||||||
restart: always
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
- ${HOME}/workspace.edu/docker-compose:/usr/app/msa-attach-volume
|
- ${HOME}/workspace:/usr/app/msa-attach-volume
|
||||||
environment:
|
environment:
|
||||||
SPRING_CLOUD_CONFIG_URI: http://config:8888
|
SPRING_CLOUD_CONFIG_URI: http://config:8888
|
||||||
SPRING_PROFILES_ACTIVE: default
|
SPRING_PROFILES_ACTIVE: default
|
||||||
|
MESSAGES_DIRECTORY: /usr/app/msa-attach-volume/messages
|
||||||
APP_HOME: /usr/app
|
APP_HOME: /usr/app
|
||||||
# logstash_hostname: logstash:5001
|
logstash_hostname: logstash:5001
|
||||||
EUREKA_INSTANCE_HOSTNAME: discovery
|
EUREKA_INSTANCE_HOSTNAME: discovery
|
||||||
MYSQL_HOSTNAME: mysql
|
MYSQL_HOSTNAME: mysql
|
||||||
RABBITMQ_HOSTNAME: rabbitmq
|
RABBITMQ_HOSTNAME: rabbitmq
|
||||||
ZIPKIN_HOSTNAME: zipkin
|
ZIPKIN_HOSTNAME: zipkin
|
||||||
TZ: Asia/Seoul
|
TZ: Asia/Seoul
|
||||||
|
depends_on:
|
||||||
|
config:
|
||||||
|
condition: service_healthy
|
||||||
|
|
||||||
boardservice:
|
boardservice:
|
||||||
container_name: boardservice
|
container_name: boardservice
|
||||||
@@ -90,10 +105,14 @@ services:
|
|||||||
SPRING_CLOUD_CONFIG_URI: http://config:8888
|
SPRING_CLOUD_CONFIG_URI: http://config:8888
|
||||||
SPRING_PROFILES_ACTIVE: default
|
SPRING_PROFILES_ACTIVE: default
|
||||||
EUREKA_INSTANCE_HOSTNAME: discovery
|
EUREKA_INSTANCE_HOSTNAME: discovery
|
||||||
|
MESSAGES_DIRECTORY: /usr/app/msa-attach-volume/messages
|
||||||
APP_HOME: /usr/app
|
APP_HOME: /usr/app
|
||||||
# logstash_hostname: logstash:5001
|
logstash_hostname: logstash:5001
|
||||||
MYSQL_HOSTNAME: mysql
|
MYSQL_HOSTNAME: mysql
|
||||||
TZ: Asia/Seoul
|
TZ: Asia/Seoul
|
||||||
|
depends_on:
|
||||||
|
config:
|
||||||
|
condition: service_healthy
|
||||||
|
|
||||||
portalservice:
|
portalservice:
|
||||||
container_name: portalservice
|
container_name: portalservice
|
||||||
@@ -105,10 +124,14 @@ services:
|
|||||||
SPRING_CLOUD_CONFIG_URI: http://config:8888
|
SPRING_CLOUD_CONFIG_URI: http://config:8888
|
||||||
SPRING_PROFILES_ACTIVE: default
|
SPRING_PROFILES_ACTIVE: default
|
||||||
EUREKA_INSTANCE_HOSTNAME: discovery
|
EUREKA_INSTANCE_HOSTNAME: discovery
|
||||||
|
MESSAGES_DIRECTORY: /usr/app/msa-attach-volume/messages
|
||||||
APP_HOME: /usr/app
|
APP_HOME: /usr/app
|
||||||
# logstash_hostname: logstash:5001
|
logstash_hostname: logstash:5001
|
||||||
MYSQL_HOSTNAME: mysql
|
MYSQL_HOSTNAME: mysql
|
||||||
TZ: Asia/Seoul
|
TZ: Asia/Seoul
|
||||||
|
depends_on:
|
||||||
|
config:
|
||||||
|
condition: service_healthy
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
version: '3'
|
version: '3.2'
|
||||||
services:
|
services:
|
||||||
config:
|
config:
|
||||||
container_name: config
|
container_name: config
|
||||||
@@ -9,11 +9,19 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- ${HOME}/workspace.edu/egovframe-msa-edu/config:/usr/app/config # volume bind
|
- ${HOME}/workspace.edu/egovframe-msa-edu/config:/usr/app/config # volume bind
|
||||||
environment:
|
environment:
|
||||||
|
SPRING_PROFILES_ACTIVE: native
|
||||||
ENCRYPT_KEY: token_secret
|
ENCRYPT_KEY: token_secret
|
||||||
logstash_hostname: logstash:5001
|
logstash_hostname: logstash:5001
|
||||||
|
SEARCH_LOCATION: file:///usr/app/config
|
||||||
RABBITMQ_HOSTNAME: rabbitmq
|
RABBITMQ_HOSTNAME: rabbitmq
|
||||||
ZIPKIN_HOSTNAME: zipkin
|
ZIPKIN_HOSTNAME: zipkin
|
||||||
TZ: Asia/Seoul
|
TZ: Asia/Seoul
|
||||||
|
healthcheck:
|
||||||
|
test: curl -f http://localhost:8888/actuator/health || exit 1
|
||||||
|
interval: 10s
|
||||||
|
timeout: 1s
|
||||||
|
retries: 10
|
||||||
|
start_period: 30s
|
||||||
|
|
||||||
discovery:
|
discovery:
|
||||||
container_name: discovery
|
container_name: discovery
|
||||||
@@ -31,7 +39,7 @@ services:
|
|||||||
image: egovframe/msa-apigateway:latest
|
image: egovframe/msa-apigateway:latest
|
||||||
ports:
|
ports:
|
||||||
- "8000:8000"
|
- "8000:8000"
|
||||||
restart: on-failure
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
- ${HOME}/workspace:/usr/app/msa-attach-volume
|
- ${HOME}/workspace:/usr/app/msa-attach-volume
|
||||||
environment:
|
environment:
|
||||||
@@ -40,10 +48,12 @@ services:
|
|||||||
EUREKA_INSTANCE_HOSTNAME: discovery
|
EUREKA_INSTANCE_HOSTNAME: discovery
|
||||||
RABBITMQ_HOSTNAME: rabbitmq
|
RABBITMQ_HOSTNAME: rabbitmq
|
||||||
ZIPKIN_HOSTNAME: zipkin
|
ZIPKIN_HOSTNAME: zipkin
|
||||||
|
TOKEN_SECRET: egovframe
|
||||||
APP_HOME: /usr/app
|
APP_HOME: /usr/app
|
||||||
TZ: Asia/Seoul
|
TZ: Asia/Seoul
|
||||||
depends_on:
|
depends_on:
|
||||||
- config
|
config:
|
||||||
|
condition: service_healthy
|
||||||
|
|
||||||
rabbitmq:
|
rabbitmq:
|
||||||
container_name: rabbitmq
|
container_name: rabbitmq
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
version: '3'
|
version: '3.2'
|
||||||
services:
|
services:
|
||||||
userservice:
|
userservice:
|
||||||
container_name: userservice
|
container_name: userservice
|
||||||
@@ -9,6 +9,7 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
SPRING_CLOUD_CONFIG_URI: http://config:8888
|
SPRING_CLOUD_CONFIG_URI: http://config:8888
|
||||||
SPRING_PROFILES_ACTIVE: default
|
SPRING_PROFILES_ACTIVE: default
|
||||||
|
MESSAGES_DIRECTORY: /usr/app/msa-attach-volume/messages
|
||||||
APP_HOME: /usr/app
|
APP_HOME: /usr/app
|
||||||
logstash_hostname: logstash:5001
|
logstash_hostname: logstash:5001
|
||||||
EUREKA_INSTANCE_HOSTNAME: discovery
|
EUREKA_INSTANCE_HOSTNAME: discovery
|
||||||
@@ -16,6 +17,9 @@ services:
|
|||||||
RABBITMQ_HOSTNAME: rabbitmq
|
RABBITMQ_HOSTNAME: rabbitmq
|
||||||
ZIPKIN_HOSTNAME: zipkin
|
ZIPKIN_HOSTNAME: zipkin
|
||||||
TZ: Asia/Seoul
|
TZ: Asia/Seoul
|
||||||
|
depends_on:
|
||||||
|
config:
|
||||||
|
condition: service_healthy
|
||||||
|
|
||||||
boardservice:
|
boardservice:
|
||||||
container_name: boardservice
|
container_name: boardservice
|
||||||
@@ -27,10 +31,14 @@ services:
|
|||||||
SPRING_CLOUD_CONFIG_URI: http://config:8888
|
SPRING_CLOUD_CONFIG_URI: http://config:8888
|
||||||
SPRING_PROFILES_ACTIVE: default
|
SPRING_PROFILES_ACTIVE: default
|
||||||
EUREKA_INSTANCE_HOSTNAME: discovery
|
EUREKA_INSTANCE_HOSTNAME: discovery
|
||||||
|
MESSAGES_DIRECTORY: /usr/app/msa-attach-volume/messages
|
||||||
APP_HOME: /usr/app
|
APP_HOME: /usr/app
|
||||||
logstash_hostname: logstash:5001
|
logstash_hostname: logstash:5001
|
||||||
MYSQL_HOSTNAME: mysql
|
MYSQL_HOSTNAME: mysql
|
||||||
TZ: Asia/Seoul
|
TZ: Asia/Seoul
|
||||||
|
depends_on:
|
||||||
|
config:
|
||||||
|
condition: service_healthy
|
||||||
|
|
||||||
portalservice:
|
portalservice:
|
||||||
container_name: portalservice
|
container_name: portalservice
|
||||||
@@ -42,10 +50,14 @@ services:
|
|||||||
SPRING_CLOUD_CONFIG_URI: http://config:8888
|
SPRING_CLOUD_CONFIG_URI: http://config:8888
|
||||||
SPRING_PROFILES_ACTIVE: default
|
SPRING_PROFILES_ACTIVE: default
|
||||||
EUREKA_INSTANCE_HOSTNAME: discovery
|
EUREKA_INSTANCE_HOSTNAME: discovery
|
||||||
|
MESSAGES_DIRECTORY: /usr/app/msa-attach-volume/messages
|
||||||
APP_HOME: /usr/app
|
APP_HOME: /usr/app
|
||||||
logstash_hostname: logstash:5001
|
logstash_hostname: logstash:5001
|
||||||
MYSQL_HOSTNAME: mysql
|
MYSQL_HOSTNAME: mysql
|
||||||
TZ: Asia/Seoul
|
TZ: Asia/Seoul
|
||||||
|
depends_on:
|
||||||
|
config:
|
||||||
|
condition: service_healthy
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ services:
|
|||||||
elasticsearch:
|
elasticsearch:
|
||||||
container_name: elasticsearch
|
container_name: elasticsearch
|
||||||
image: docker.elastic.co/elasticsearch/elasticsearch:7.10.1
|
image: docker.elastic.co/elasticsearch/elasticsearch:7.10.1
|
||||||
# restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- "9200:9200"
|
- "9200:9200"
|
||||||
environment:
|
environment:
|
||||||
@@ -20,7 +20,7 @@ services:
|
|||||||
logstash:
|
logstash:
|
||||||
container_name: logstash
|
container_name: logstash
|
||||||
image: docker.elastic.co/logstash/logstash:7.10.1
|
image: docker.elastic.co/logstash/logstash:7.10.1
|
||||||
# restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- "5001:5001"
|
- "5001:5001"
|
||||||
environment:
|
environment:
|
||||||
@@ -39,7 +39,7 @@ services:
|
|||||||
kibana:
|
kibana:
|
||||||
container_name: kibana
|
container_name: kibana
|
||||||
image: docker.elastic.co/kibana/kibana:7.10.1
|
image: docker.elastic.co/kibana/kibana:7.10.1
|
||||||
# restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- "5601:5601"
|
- "5601:5601"
|
||||||
environment:
|
environment:
|
||||||
|
|||||||
Reference in New Issue
Block a user