English | 简体中文
- Sample File: dandelion.conf.sample
First of all, you need to copy the configuration file from sample.
Generally, you should change the following values:
[DEFAULT] debug: true log_file: dandelion.log log_dir: /var/log/dandelion [cors] origins: * [database] connection: mysql+pymysql://dandelion:[email protected]:3306/dandelion [mqtt] host: 127.0.0.1 port: 1883 username: root password: 123456 [redis] connection: redis://root:[email protected]:6379?db=0&socket_timeout=60&retry_on_timeout=yes [token] expire_seconds: 604800
At last, you can link the
etc/dandelion/dandelion.conf
to the/etc/dandelion/dandelion.conf
file.
Build docker image.
RELEASE_VERSION=`git rev-parse --short HEAD`_`date -u +%Y-%m-%dT%H:%M:%S%z` GIT_BRANCH=`git rev-parse --abbrev-ref HEAD` GIT_COMMIT=`git rev-parse --verify HEAD` docker build --no-cache --pull --force-rm --build-arg RELEASE_VERSION=${RELEASE_VERSION} --build-arg GIT_BRANCH=${GIT_BRANCH} --build-arg GIT_COMMIT=${GIT_COMMIT} -f Dockerfile -t dandelion:latest .
Run dandelion service as container.
mkdir -p /var/log/dandelion docker run -d --name dandelion_bootstrap -e KOLLA_BOOTSTRAP="" -v /etc/dandelion/dandelion.conf:/etc/dandelion/dandelion.conf --net=host dandelion:latest docker rm dandelion_bootstrap docker run -d --name dandelion --restart=always -v /etc/dandelion/dandelion.conf:/etc/dandelion/dandelion.conf -v /var/log/dandelion:/var/log/dandelion --net=host dandelion:latest
Before you run the dandelion server, you need to follow the Configuration section.
- You can visit the OpenAPI swagger document at
http://127.0.0.1:28300/docs
Generate the migration script.
Run the migration script and update the database.
Generate the latest swagger file.
Generate the latest sample config file.
Code format and style check.
install requirement
execute test
- Please run dprint fmt to format markdown files before creating PR.