diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 5fb8da1c..283e4fa9 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -65,6 +65,17 @@ services: - ruoyi-gateway links: - ruoyi-gateway + ruoyi-sentinel: + container_name: yanshi-sentinel + build: + context: ./sentinel + volumes: + - ./sentinel/logs:/logs/sentinel + ports: + - "8719:8719" + - "8858:8858" + links: + - ruoyi-nacos ruoyi-gateway: container_name: ruoyi-gateway build: @@ -76,6 +87,7 @@ services: - ruoyi-redis links: - ruoyi-redis + - ruoyi-sentinel ruoyi-auth: container_name: ruoyi-auth build: diff --git a/docker/sentinel/Dockerfile b/docker/sentinel/Dockerfile new file mode 100644 index 00000000..7f0d6794 --- /dev/null +++ b/docker/sentinel/Dockerfile @@ -0,0 +1,16 @@ +FROM openjdk:8-jre + +MAINTAINER ruoyi + +ADD https://hub.fastgit.org/alibaba/Sentinel/releases/download/1.8.2/sentinel-dashboard-1.8.2.jar app.jar + +EXPOSE 8858 8719 + +VOLUME /logs/sentinel + +ENTRYPOINT [ \ +"java","-Djava.security.egd=file:/dev/./urandom","-Dserver.port=8858", \ +"-Dcsp.sentinel.api.port=8719","-Dcsp.sentinel.dashboard.server=localhost:8858", \ +"-Dlogging.file=/logs/sentinel/sentinel-dashboard.log", "-Dcsp.sentinel.log.dir=/logs/sentinel", \ +"-Dproject.name=sentinel-dashboard","-jar","app.jar" \ +]