Hello, I’m Big Zongzi

I really love dearly

Why is that? Because many of my friends can’t run my open source projects in their hands, basically 80 or 90 percent of them are due to environmental factors. Either MySQL or Redis can’t connect, or there is a problem with the nginx path, etc. As a result, it could not run, so they left messages to me. Some friends really left messages saying problems, some left messages discussing whether they could cooperate with each other, and some left messages complaining about bad projects. I Clone it down and started running for several days.

To tell the truth, I was heartache when I saw that the operation could not get up, but how to do? Mao grandpa said, the way is always more than the problem, this I will use Docker compiled source code, and then write the configuration file, get the code directly according to the command to install Docker environment, knock the command, wait, after running directly to see the effect.

This uses the implementation of docker-compose, which posts some of the main configurations

To get the dry stuff, Docker veterans can find the download password directly at the end of the article

This method is only used for quick preview in Docker environment and is not recommended for official operation
docker composePreconditions for the script to run

This information is configured for understanding in Dockerfile and is configured for reference only

  1. MySQL needs to confirm the port and ServiceName (used by Java projects to connect to the database)

    The default port is 3306

    servicename = mysqlserver

    Account and password root/root

  2. redis

    The default port is 6379

    sericeName = redisserver

    Password is 123456

  3. nginx

    sericeName = nginxserver

    Default port list

    8899 Web PC management terminal

    9999 H5

    The 9090 picture service has been hooked up to all the latest picture resources

  4. Java

    sericeName = javaserver

    Default port 8081

Execution steps:

If you have made changes to the configuration, you need to verify that the configuration changes are correct. If no changes are made, specify the following commands directly

For Mac and Windows, you can use the docker-compose command directly after installing docker

For Linux, there is no docker-compose that can be installed according to the following script. Skip the command

Install the dockerInstalled skip

curl -sSL https://get.daocloud.io/docker | sh

\#### mount docker-compose has been installed skip

Sudo curl - L "https://github.com/docker/compose/releases/download/1.26.2/docker-compose-$(uname - s) - $(uname -m)" - o /usr/local/bin/docker-compose sudo chmod +x /usr/local/bin/docker-compose

To verify this, type docker-compose-v

Start the docker

service docker start

Execute the script and wait, which can be a lengthy process depending on the network and server hardware

To make sure the Docker environment is OK, you can put the CD in the Docker directory

Direct execution

docker-compose up  

Until the whole service is running correctly, access the book items according to IP and port

If it is a cloud server, you need to open the following ports

end Access to the address Account number/password
Swagger document http:ip:8081/doc.html crmeb / ZeypRDYBfM
WEBPC management side http:ip:8899 Account admin / 123456
H5 mobile terminal http:ip:9999 One pass to buy short credo number test

The image service is configured manually

Open the Web PC administration side and find the file upload configuration by setting. Change the local image domain name to your own IP or domain name and then change the path to your actual nginx location address


Not afraid of alopecia big dumplings, the more you know, the more you don’t know, the questions you ask me on record, gradually eliminated.

Sometimes I wonder if I should crowdfund hair transplants.

If you want to experience it, you can reply to “Docker” in the background of WeChat. You can also download it and preview it according to the document