-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Welcome to the springcloud wiki!
######################################
run admin: if you need nount log , pls add -v /opt/docker/logs/admin/:/tmp/
sudo docker run -it -d --restart unless-stopped -p 9000:9000 --net host -e JAVA_OPTS="-Xmx128m -Xss512k" -e ADMIN_USERNAME=sea -e ADMIN_PASSWORD=sea happysea/micro:admin
#####################################
run eureka: if you need nount log , pls add -v /opt/docker/logs/eureka/:/tmp/
sudo docker run -it -d --restart unless-stopped -p 8761:8761 --net host \
-e JAVA_OPTS="-Xmx128m -Xss512k" -e EUREKA_USERNAME=sea -e EUREKA_PASSWORD=sea \
-e EUREKA_DEFAULTZONE=http://sea:[email protected]:8761/eureka \
-e EUREKA_REGISTER_WITH_EUREKA=false \
-e EUREKA_ENABLE_SELF_PRESERVATION=false \
-e EUREKA_FETCH_REGISTRY=false \
happysea/micro:eureka
###################################
config in you application.properties:
eureka.client.service-url.defaultZone = http://sea:[email protected]:8761/eureka/
eureka.instance.prefer-ip-address = true
#spring.boot.admin.client.url = http://sea:[email protected]:9000/
spring.boot.admin.client.url = http://192.168.18.204:9000/
spring.boot.admin.client.username=sea
spring.boot.admin.client.password=sea
spring.boot.admin.client.instance.service-base-url = http://192.168.18.199:7088/
management.endpoints.web.exposure.include = *
management.endpoint.health.show-details = ALWAYS
################## gate way start ########################
sudo docker run -itd --restart=always --name=sea_gateway -p:7100:7100 -e JAVA_OPTS="-Xmx128m -Xss512k" -v /home/sea/Desktop/XXX/application.yml:/opt/conf/application.yml -v /opt/docker/sea-gateway/log/:/tmp/ happysea/micro:gateway
application.yml see : https://github.com/Lshan523/gateway-service