In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
Docker containers quickly and efficiently deploy applications, resource orchestration defines and runs multiple containers, declares each service through docker-compose.yml configuration files, and creates and starts as a whole.
MySQL+Redis+ActiveMQ is a commonly used development environment, installation and configuration is a bit cumbersome, new engineers or new machines often take a lot of time, why not try Docker-compose one-click deployment?
L data layers in common architectures:
L Docker installation:
Https://docs.docker.com/install/linux/docker-ce/ubuntu/
Https://docs.docker.com/docker-for-windows/install/
L script download:
Https://github.com/rickding/HelloDocker/tree/master/data
├── docker-compose.yml
├── pull.sh
├── up.sh
├── logs.sh
├── down.sh
L docker-compose.yml script configuration service:
Db_admin needs to connect to the MySQL instance, so the depends_on property is set.
Version:'3'
Services:
Db:
Image: mysql:5
Command:-- default-authentication-plugin=mysql_native_password
Ports:
-3306 3306
Environment:
MYSQL_DATABASE: starter
MYSQL_ROOT_PASSWORD: root
Db_admin:
Image: adminer:latest
Ports:
-3006 purl 8080
Depends_on:
-db
Cache:
Image: redis:4
Command: redis-server-- appendonly yes
Ports:
-6379PUR 6379
Mq:
Image: webcenter/activemq:latest
Ports:
-61616purl
-8161 Phantom 8161
L pull.sh pull image
You can run docker pull mysql:5 directly to pull the image and view it with docker images:
L up.sh startup container
The docker-compose up-d command is encapsulated in the script. After startup, run docker ps to view the container instance:
L logs.sh View Log
Custom commands highlight important information:
Docker-compose logs-ft | grep-- color-I-e error-e warn-e version-e exception
L down.sh stop service
Docker-compose down-- remove-orphans stops and deletes the container:
L View services:
Db_admin:
ActiveMQ:
Using docker-compose to deploy MySQL+Redis+ActiveMQ with one click is as simple as wayward.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.