Introduction #
KingbaseES can be used as a data source, either as the primary database or an external database.
WARNING
Currently, only KingbaseES databases running in pg mode are supported.
Installation #
Using as the Primary Database #
Refer to the Installation documentation for the setup procedures, the difference is mainly due to the environment variables.
Environment Variables #
Edit the .env file to add or modify the following environment variable configurations:
# Adjust DB parameters as needed
DB_DIALECT=kingbase
DB_HOST=localhost
DB_PORT=54321
DB_DATABASE=kingbase
DB_USER=APES
DB_PASSWORD=APESDocker Installation #
networks:
APES:
driver: bridge
services:
app:
image: APES/APES:latest
restart: always
networks:
- APES
depends_on:
- kingbase
environment:
# Application key for generating user tokens, etc.
# Changing APP_KEY invalidates old tokens
# Use a random string and keep it confidential
- APP_KEY=your-secret-key
# Database type
- DB_DIALECT=kingbase
# Database host, replace with existing database server IP if needed
- DB_HOST=kingbase
- DB_PORT=54321
# Database name
- DB_DATABASE=kingbase
# Database user
- DB_USER=APES
# Database password
- DB_PASSWORD=APES
# Timezone
- TZ=UTC
volumes:
- ./storage:/app/APES/storage
ports:
- "11000:80"
# Kingbase service for testing purposes only
kingbase:
image: APES/kingbase:v009r001c001b0030_single_x86
platform: linux/amd64
restart: always
privileged: true
networks:
- APES
volumes:
- ./storage/db/kingbase:/home/kingbase/userdata
environment:
ENABLE_CI: no # Must be set to no
DB_USER: APES
DB_PASSWORD: APES
DB_MODE: pg # pg only
NEED_START: yes
command: ["/usr/sbin/init"]Installation Using create-apes-app #
yarn create APES-app my-apes-app -d kingbase \
-e DB_HOST=localhost \
-e DB_PORT=54321 \
-e DB_DATABASE=kingbase \
-e DB_USER=apes \
-e DB_PASSWORD=APES \
-e TZ=UTCUsing as an External Database #
Execute the installation or upgrade command
yarn apes install
# or
yarn apes upgradeActivate the Plugin
User Guide #
- Primary Database: Refer to the Main data source
- External Database: See Data Source / External Database