nacos-docker/example/standalone-mysql-5.7.yaml

37 lines
850 B
YAML
Raw Normal View History

version: "3.8"
2019-05-22 08:18:41 +00:00
services:
nacos:
2021-03-21 07:13:03 +00:00
image: nacos/nacos-server:${NACOS_VERSION}
2019-05-22 08:18:41 +00:00
container_name: nacos-standalone-mysql
env_file:
2022-10-20 13:13:07 +00:00
- ../env/custom-application-config.env
2019-05-22 08:18:41 +00:00
volumes:
- ./standalone-logs/:/home/nacos/logs
2022-10-20 13:13:07 +00:00
- ./init.d/application.properties:/home/nacos/conf/application.properties
2019-05-22 08:18:41 +00:00
ports:
- "8848:8848"
2021-04-13 00:31:12 +00:00
- "9848:9848"
2019-05-22 08:18:41 +00:00
depends_on:
mysql:
condition: service_healthy
2019-05-22 08:18:41 +00:00
restart: on-failure
mysql:
container_name: mysql
build:
context: .
dockerfile: ./image/mysql/5.7/Dockerfile
image: example/mysql:5.7
2019-05-22 08:18:41 +00:00
env_file:
- ../env/mysql.env
2019-05-22 08:18:41 +00:00
volumes:
- ./mysql:/var/lib/mysql
2019-05-22 08:18:41 +00:00
ports:
- "3306:3306"
healthcheck:
test: [ "CMD", "mysqladmin" ,"ping", "-h", "localhost" ]
interval: 5s
timeout: 10s
retries: 10
2019-05-22 08:18:41 +00:00