Skip to content

First Deployment ​

Updated: 11/17/26, 11:11:35 AM

This page walks through deploying a DaxPay stack from scratch in the operations panel: which page to open at each step, what to do there, and how to tell that the step is done. Follow the same order when you rebuild an environment. For day-to-day start/stop and configuration changes on a server that is already deployed, see Daily Operations.

Deployment Order ​

After you log in, the panel opens the Overview page, and the sidebar on the left lists every management page. A first deployment goes through them in this order:

StepSidebar pageWhat to do
Step 1Overview, Docker Management, Extension SourceCheck the server, install Docker and Git
Step 2Global ConfigurationApply a memory tier; confirm the JVM, build concurrency, and build mirrors
Step 3Base EnvironmentDeploy PostgreSQL, Redis, and Artemis
Step 4Business EnvironmentPick the version and run mode, download the code, initialize the database, prepare the IP data files, build the images, deploy the business system (demo mode additionally starts the mock gateway)
Step 5Gateway ManagementDeploy the gateway, bind domains, set up CDN access and the external endpoints

A button stays disabled until its preconditions are met; hover over it to see what is missing. Long-running operations such as downloading code, building images, and deploying run as background tasks. Follow their progress and output in the Task Center at the bottom-right corner; switching pages or refreshing the browser does not interrupt them.

Step 1: Prepare the Server ​

The server needs:

  • amd64 Linux with at least 4 GB of memory (8 GB or more is recommended for production);
  • access to the source repositories, the Docker image registry, and the Maven / npm dependency sources;
  • port 80 free (the gateway serves traffic on port 80; HTTPS is terminated by the outer CDN or gateway, and the origin does not listen on 443);
  • for production, planned domains, a CDN / HTTPS access approach, and enough disk space for the database.

Then check three things in the panel:

  1. Overview: confirm in the system info and runtime load cards that memory and disk are sufficient; the port check lists any ports that conflict with the gateway or the business services.
  2. Docker Management → Config: if Docker is not installed, click "Install Docker", pick the install source and registry mirror in the dialog, then click "Start Installation".
  3. Extension Source → Code Source: the first row of the card is "Git Environment". If it shows Git as installed with a version number, you are set. If it shows Git as not installed, click "Install Git" on the same row and confirm; the panel installs it with apt, yum, or dnf depending on the distro.

The step is done when Docker Management shows the engine information and the Git Environment row shows Git as installed. If the server already has Docker and Git, just confirm and move on.

Step 2: Global Configuration ​

Open "Global Configuration". The page has two parts. "Runtime Configuration" applies to every container, and changing it after deployment only takes effect after a redeploy, so settle it before you deploy. "Build Configuration" only affects image builds and takes effect automatically on the next build.

SettingHow to choose
Memory tierPick Compact (≥ 4 GB), Standard (≥ 8 GB, recommended), or Enhanced (≥ 16 GB) to match the server's memory, then click "Apply Tier". The panel recommends a tier based on the host's memory
JVM runtimeChoose HotSpot (standard) or OpenJ9 (low memory) for the Java JVM; this sets the base image of the backend and the channel sub-apps. Applying a tier resets the JVM to that tier's default, so change the JVM after applying the tier if you want a different one
Build concurrencyThe default "Smart" decides how many build containers run at once based on host memory. On low-spec machines, or machines where other workloads use a lot of memory, pin it to "Low Memory (1 concurrent)"
Build mirrorsPick the download sources for Maven and npm; on servers in mainland China, choosing a domestic mirror shortens builds noticeably

For the memory allocation of each tier, see Configuration and Troubleshooting - Memory Tiers.

Step 3: Deploy the Base Environment ​

Open "Base Environment" and click "One-Click Deploy" under "Deployment Management". The panel pulls the images and starts the three middleware services: PostgreSQL, Redis, and Artemis.

  • The middleware passwords are generated by the panel; click "View Passwords" to see them. To change a password later, use "Change Password" in the service card's "Config" drawer. The panel updates the middleware itself and prompts you to restart the business containers. Do not edit the configuration files on the server by hand.
  • Middleware ports are not mapped to the host by default; only the business containers reach them, over the Docker network.

The step is done when all three service cards show as running. Database initialization and the business deployment both depend on the base environment, so do not continue until everything is running.

Step 4: Deploy the Business Environment ​

Open "Business Environment". The preparation work sits in the "Versions and Builds" area in the lower half of the page. Complete it in the order below, then go back to the top of the page to deploy.

Choose the Version and Run Mode ​

In the "Deployment Version" card:

  • Version: "Follow the 4.0 branch" tracks the latest code; "Pin a Release Tag" locks the deployment to a specific release.
  • Run mode: "Production" loads the production dataset and runs in PROD with the sandbox off; "Demo" loads the demo dataset and runs in DEV with the sandbox on. Choose "Production" for a real environment.

The run mode decides which dataset the database initialization loads. If you switch modes after the database is initialized, the data in the database does not change with it; the only way to switch datasets is to force-rebuild the database, which wipes the existing data. Pick the mode before you initialize.

Download the Code ​

In "Project Code", click "Download Code". The panel pulls the source of the main backend, the channels, the consoles, the H5 app, and the extension channels for the selected version; when it finishes, the card shows "Downloaded N/M".

  • The extension channel repositories need code-source credentials. Without credentials or access rights they are skipped automatically, so a downloaded count below the total is normal and does not block building or deployment.
  • Switching the version later only changes the configuration; click "Update Code" afterwards to pull the source for the new version.
  • The "Per-Repository Details" link on the card is collapsed by default; expand it to see each repository's clone status, current version, local commit (full hash copyable), and how many commits it is behind the remote.

Prepare the Data ​

Complete all items under "Data Preparation":

  • Database initialization: click "Initialize". The panel creates the schema and imports the dataset that matches the run mode; when it finishes, the card shows "Initialized" with the table count. After that the button becomes "Force Rebuild", which wipes the existing data, so do not use it casually in production.
  • IP data files: building the main backend image requires both the IPv4 and the IPv6 ip2region data files. Open the Gitee or GitHub download page from the panel, download them in the browser, then upload them with "Upload .xdb File".
  • Reset the built-in super admin password: use it when the password of the built-in super admin bootx is forgotten; after confirming in the dialog, the password is reset to the default 121212 (clearing the wrong-password count and lockout state) — sign in afterwards and change it immediately.

Build the Images ​

In "Image Build", click "One-Click Build All". The main backend, the channel sub-apps, the admin console, the merchant console, and the H5 app build in parallel; when extension channel credentials are configured, the extension channel images join the build automatically; once the App H5 sites are enabled (see App H5 Sites below), the two site images join the list as well. Each image can also be built on its own, so if a single service fails, rebuild only that one. The badge at the right of each service panel's title shows the image state: Not built / Built, plus actionable states such as Image missing, Image stale, Container stale.

"One-Click Build All" stays disabled until the IP data files are ready. Building is the slowest part of the whole deployment; how long it takes depends on build concurrency, CPU, memory, network, and the dependency cache.

Deploy the Business System ​

Once the images, the database, and the IP data files are all ready, the "Deploy Business System" button at the top of the page becomes clickable. Click it and the panel deploys the main backend, the channel sub-apps, the admin console, the merchant console, and the H5 app; in demo mode it additionally starts the mock gateway container (see Demo Mode below).

The first deployment generates the RSA, AES, and channel transport keys and writes them into the runtime configuration for good. Do not regenerate these keys in production, or data that is already encrypted may become undecryptable. Business containers do not map host ports by default; all external access goes through the gateway. If you need a direct connection for debugging, see Configuration and Troubleshooting - Port Exposure.

The step is done when the top of the page shows "Current Running Version" and the backend and frontend service cards all show as running.

App H5 Sites ​

The business system includes two optional static sites, "Admin Mobile H5" and "Merchant Mobile H5". Once enabled, the admin and merchant consoles can be opened directly in a phone browser — no mini-program qualification or packaging required. Both sites are off by default and do not affect a regular deployment.

  • Enable them in the "H5 Site Deployment" block of the corresponding product card on the Mobile Management page; the toggle asks for confirmation, and disabling removes the site container at once (the image is kept);
  • after enabling, return to the "Business Environment" page — the two sites build and deploy alongside the other services, following the business source version;
  • external access goes through the gateway with a bound domain (see Gateway Management - Domain Binding); while a site is not enabled, the gateway refuses to bind its domain.

Demo Mode ​

The run mode is picked in the "Deployment Version" card, in two tiers: "Production" and "Demo". Production targets real business; Demo targets product demonstrations and local trials, and deploys with the behavior below.

  • Database: initialization loads the demo dataset data-demo.sql — demo accounts, demo merchants, and the mock channel work out of the box;
  • Mock gateway: deploying the business system automatically starts the daxpay-mock-channel container, marked demo in the ownership column of Docker Management, and its service card on the Business Environment page carries a "Demo" marker; it plays the third-party channel and handles payments, callbacks, and refunds of the mock channel;
  • Extension source: the status board adds the mock component repository of the basic group; the repository builds and deploys with the one-click build on the Business Environment page and does not count toward the tier badge;
  • Mock channels: available by default — the full payment chain works without onboarding a real channel.

The mock gateway ships its own console; the default HTTP Basic credentials are mock for both account and password. On the Business Environment page, the mock gateway card's "Config" drawer lets you change the authentication switch, the account, and the password; the changes take effect only after the mock gateway container is rebuilt in Docker Management — restarting the container is not enough.

Mock channels and the mock gateway are for demos, integration testing, and training only — never expose them to the public network: to reach them from another machine, go through the gateway domain and change the default credentials first; the mock gateway's port exposure supports only off and local, not public — see Configuration and Troubleshooting - Port Exposure. After switching back to Production and redeploying, the panel no longer starts the mock gateway container and cleans up leftover demo containers; the database is not switched to the production dataset automatically — use Force Rebuild as described above.

Step 5: Deploy the Gateway ​

Open "Gateway Management". The gateway is a standalone nginx container that uses port 80 by default and serves as the single public entry point of the whole system.

  1. On the "Overview" tab, click "One-Click Deploy" under "Deployment Management".
  2. On the "Domain Binding" tab, enter the domains for the admin console, merchant console, H5, backend API, and Artemis console. Enter bare domains only, without http:// or a path, and leave the ones you do not need blank. If mini programs or apps need a dedicated entry point, also bind a Mobile API domain; once the App H5 sites are enabled, their domains can be bound as well.
  3. On the "CDN / Outer-Layer Access" tab, choose the access mode. If the domains resolve straight to the server, choose "Direct to origin". If they sit behind a CDN or an outer gateway, choose "Via CDN / outer gateway origin-pull"; the panel generates an origin-pull token, which you then set as the origin-pull header in the CDN console, following the checklist on the page. Production deployments should go through the CDN. Do not click "Apply Gateway Config" before the CDN origin-pull header is in place, or every bound domain will return 404.
  4. On the "External Endpoints" tab, review the toggles: the merchant open API /unipay, channel callbacks /unipay/callback, the mini program / APP API /app-*, and Open Access Interfaces /client/ are on by default; the EPay-compatible endpoint /epay is off by default. Adjust them as needed.
  5. Click "Apply Gateway Config"; the panel renders the nginx configuration and reloads it.

Later changes to domains, the access mode, or the endpoint toggles only need "Apply Gateway Config"; there is no need to redeploy the gateway. For the full description of each tab, see Gateway Management.

Post-Deployment Checks ​

  1. On the Overview page, the service cards of the base environment and the business system all show as running normally.
  2. The admin console, merchant console, and H5 open through their bound domains.
  3. The open APIs respond through the backend API domain.
  4. The Task Center has no failed tasks, and the business and gateway logs show no recurring errors.
  5. For a production environment, check the "Environment Posture" bar at the top of the Business Environment page: the run mode is "Production (PROD)", the sandbox and the super admin are both off, and there are no inconsistency warnings.

If something fails during deployment, open the failed task's log in the Task Center first; for common problems see FAQ - One-Click Deployment and the Operations Panel.