代码拉取完成,页面将自动刷新
# yaml 配置
version: '3'
services:
springboot-demo:
build: .
depends_on:
- "skywalking-oap-server"
- "skywalking-ui"
- "db"
- "redis"
ports:
- "18080:18080"
container_name: "springboot-demo"
hostname: "springboot-demo-host"
restart: on-failure
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:18080/api/city/1"] # 设置检测程序
interval: 30s # 设置检测间隔
timeout: 10s # 设置检测超时时间
retries: 3 # 设置重试次数
environment:
TZ: Asia/Shanghai
MYSQL_USER: root
MYSQL_PASSWORD: admin
MYSQL_DATABASE: test
MYSQL_PORT: 3306
MYSQL_HOST: mysql-compose-container-net
REDIS_PORT: 6379
REDIS_HOST: redis-compose-container-net
networks:
springboot-demo-network:
aliases:
- springboot-demo-net
db:
image: "mysql"
container_name: "mysql-compose-container"
hostname: "mysql-compose-container-host"
restart: on-failure
environment:
TZ: Asia/Shanghai
MYSQL_ROOT_PASSWORD: admin
MYSQL_DATABASE: test
command:
--default-authentication-plugin=mysql_native_password
--character-set-server=utf8mb4
--collation-server=utf8mb4_general_ci
--explicit_defaults_for_timestamp=true
--lower_case_table_names=1
--max_allowed_packet=128M
ports:
- "3306:3306"
volumes:
- "/Users/dranlyh/data/dockervolume/mysqldb:/var/lib/mysql"
networks:
springboot-demo-network:
aliases:
- mysql-compose-container-net
redis:
image: "redis"
ports:
- "6379:6379"
container_name: "redis-compose-container"
hostname: "redis-compose-container-host"
restart: on-failure
environment:
TZ: Asia/Shanghai
networks:
springboot-demo-network:
aliases:
- redis-compose-container-net
es:
image: "elasticsearch:6.7.2"
ports:
- "9200:9200"
- "9300:9300"
container_name: "es-compose-container"
hostname: "es-compose-container-host"
restart: always
environment:
discovery.type: "single-node"
networks:
springboot-demo-network:
aliases:
- es-compose-container-net
skywalking-oap-server:
image: apache/skywalking-oap-server
ports:
- "1234:1234"
- "11800:11800"
- "12800:12800"
container_name: "skywalking-oap-server-container"
hostname: "skywalking-oap-server-host"
restart: always
environment:
SW_STORAGE_ES_CLUSTER_NODES: "elasticsearch:9200"
TZ: Asia/Shanghai
networks:
springboot-demo-network:
aliases:
- skywalking-oap-server-net
skywalking-ui:
image: apache/skywalking-ui
ports:
- "8080:8080"
container_name: "skywalking-ui-container"
hostname: "skywalking-ui-host"
environment:
TZ: Asia/Shanghai
SW_OAP_ADDRESS: skywalking-oap-server-net:12800
restart: always
depends_on:
- "skywalking-oap-server"
networks:
springboot-demo-network:
aliases:
- skywalking-ui-net
networks:
springboot-demo-network:
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。