中文 / English
:tw-2705: Currently only verified by Centos7 .
:tw-274c: Centos8/9 is still being verified and will be updated after verification
Check the Docker version (return version information indicating that the Docker is installed)
docker --version
docker-compose --version
Note: Please ensure that the Docker is installed before proceeding with the next steps
Download the docker-compose.yml configuration file, which is the core of Docker Compose and is used to define services, networks, and data volumes. If no modifications are made, execute the startup command directly
Docker composite -f docker composite.yml up -d # -f for executing the specified yml, -d for executing in the background and returning
The container service will be installed by default:
Container Service Name | Default Host Port | Starting Container Service Dependency | Access Address | Container Service Start Stop Command | Description |
---|---|---|---|---|---|
neatlogic-db | 3306 | - | - | Start:/app/databases/neatlogicdb/scripts/neatlogicdb start Stop:/app/databases/neatlogicdb/scripts/neatlogicdb stop |
MySQL database |
neatlogic-collectdb | 27017 | - | - | Start:/app/databases/collectdb/bin/mongod -- config/app/databases/collectdb/conf/mongodb.conf Stop: mongo 127.0.0.1:27017/admin uadmin - p u1OPgeInMhxsNKnl<EOF db. shutdownServer()< br>exit;< EOF |
mongodb, if using cmdb for automatic collection, automation, inspection, and publishing, this service is required |
neatlogic-runner | 8084, 8888 | - | - | Start: deployadmin - s autoexec-runner - a startall Stop: deployadmin - s autoexec-runner - a stopall |
Executor, if using publish, patrol, automation, or agent, this service is required |
neatlogic-app | 8282 | neatlogic-db neatlogic-collectdb neatlogic-runner neatlogic-nacos |
- | Start: deployadmin - s neatlogic - a startall Stop: deployadmin - s neatlogic - a stopall |
Backend service |
netlogic-web | 8090, 8080, 9099 | netlogic app | HostIP:8090/TenantName #Front End Page HostIP:9099 #Tenant Management Page Login Account: admin Password: 123456 |
Start:/app/systems/nginx/sbin/nginx Restart:/app/systems/nginx/sbin/nginx - s reload Stop: kill xx |
Front End Service |
neatlogic-nacos | 8848 | neatlogic-db | Start:/app/systems/nacos/bin/startup.sh - m standalone nacos | Backend service config |
Because the startup of the Docker container service is asynchronous, the completion of the startup command mentioned above does not mean that the service has started normally
We still need to wait a few minutes before accessing the front-end service: http://HostIP:9099/ If a login page appears, congratulations on the successful deployment of the service
If the prompt indicates that the tenant does not exist, you need to check the logs, which may indicate that the service is still waiting to start
docker-compose -f docker-compose.yml logs -f neatlogic-app
If there is an error in the log, please contact us Neatlogic in Slack
1. Data persistence Persistence is not configured by default. If necessary, please refer to the following configuration modifications: neatlogic-db
volumes:
- /app/logs/neatlogicdb/:/app/logs/neatlogicdb/
- type: volume
source: db_data
target:/app/databases/natlogicDb/# Host path
neatlogic-collectdb
volumes:
- /app/logs/collectdb/:/app/logs/collectdb/
- type: volume
source: collectdb_data
Target:/app/databases/collectdb/# Host path
neatlogic-runner
volumes:
- /app/logs/neatlogic-runner/:/app/logs/autoexec-runner/
- type: volume
source: autoexec_data
target:/app/autoexec/data/# Host path
2. Host Port Conflict Simply modify the ports field. For example, if there is a conflict with the 8080 port on the neatlogic-web, you need to change the host port on the left to a non occupied port. If I want to change it to 8081:
ports:
- "8090:8090"
- "8081:8080"
- "9099:9099"
3. Do not use the built-in container service
If a container service is not needed, simply delete the corresponding container service configuration and modify the environment attribute of the dependent container service
If there is no need for neatlogic-db, as neatlogic-db is dependent on neatlogic-app and neatlogic-nacos, both neatlogic-app and neatlogic-nacos need to modify the MYSQL of the environment_SERVICE_HOST、MYSQL_SERVICE_PORT、MYSQL_SERVICE_USER、MYSQL_SERVICE_PASSWORD, such as:
Customized use of external mysqldb 192.168.1.33:3306, account/password: app/123456
environment:
#MySQL configuration for connections
MYSQL_SERVICE_HOST: "192.168.1.33"
MYSQL_SERVICE_PORT: 3306
...
MYSQL_SERVICE_USER: app
MYSQL_SERVICE_PASSWORD: "123456"
Create a container based on yml and start all container services
Docker composite -f docker composite. yml up -d # -f for executing the specified yml, -d for executing in the background and returning
If you only need to process a certain container service, simply add the container service name after the command, such as:
Docker composite -f docker composite. yml up -d neatlogic-app # Recreate and start the neatlogic-app service separately
View logs of all container services
docker-compose -f docker-compose.yml logs
If you only need to view the logs of a certain container service, simply add the container service name after the command, such as:
docker-compose -f docker-compose.yml logs neatlogic-app
docker-compose -f docker-compose.yml logs -f
docker-compose -f docker-compose.yml ps
docker-compose -f docker-compose.yml start
docker-compose -f docker-compose.yml stop
If you only need to start a certain container, simply add the container service name after the command, such as:
docker-compose -f docker-compose.yml start neatlogic-app
Non essential users do not need to enter the container service, such as the neatlogic-app container service:
docker-compose -f docker-compose.yml exec neatlogic-app sh
docker-compose -f docker-compose.yml down