-
Notifications
You must be signed in to change notification settings - Fork 393
03 quickly docker deploy
Alpha Yu edited this page Apr 26, 2026
·
1 revision
- Recommended OS:
Ubuntu 22.04 -
DockerandDocker Composemust be pre-installed.
mkdir -p /opt/adnc/srcdocker network create \
--driver=bridge \
--subnet=172.80.0.0/16 \
--ip-range=172.80.5.0/24 \
--gateway=172.80.5.254 \
adnc_network_mainUpload the adnc\doc\devops-staging folder from your local machine to the /opt/adnc directory on the server.
The server directory structure should look like this:
opt
└── adnc
├── devops-staging
└── srccd /opt/adnc/devops-staging
docker compose up -dThe docker-compose.yml file performs the following:
- Deploys a
Consulcluster and initializes configuration. - Deploys
MariaDBand initializes the database. - Deploys
Redis. - Deploys
RabbitMQ. - Deploys
GrafanaandLoki. - Deploys
Nginx.
Check container status after deployment:
docker container lsapt-get update && \
apt-get install -y dotnet-sdk-8.0Before uploading, run
Delete-BIN-OBJ-Folders.batlocally to clean allbinandobjdirectories.
Upload the following folders and files to the /opt/adnc/src directory on the server:
-
Demodirectory -
Gatewaysdirectory Directory.Build.propsDirectory.Packages.propsdeploy_demo.shdeploy_ocelot.sh
The server directory structure should look like this:
adnc
├── src
│ ├── Demo
│ ├── Gateways
│ ├── deploy_demo.sh
│ ├── deploy_ocelot.sh
│ ├── Directory.Packages.props
│ └── Directory.Build.props
└── devops-stagingcd /opt/adnc/src
chmod +x deploy_demo.sh deploy_ocelot.sh
bash deploy_demo.sh
bash deploy_ocelot.sh- Visit
http://{SERVER_IP}:8590to open the Consul UI and check ifadmin,maint, andcustservices are registered successfully. - Visit
http://{SERVER_IP}:5000to verify if the gateway is working.
pnpm run build- After a successful
build, upload the files from thedistdirectory to/opt/adnc/devops-staging/adnc-nginx/html. - Access
http://{SERVER_IP}and log in to verify the system deployment.
The ADNC deployment is now complete.
- Official Website: https://aspdotnetcore.net
- Online Demo: https://online.aspdotnetcore.net
- Documentation: https://docs.aspdotnetcore.net
- Code Generator: https://code.aspdotnetcore.net