#### What type of PR is this?
/kind improvement
#### What this PR does / why we need it:
When traefik is used, the host cannot be accessed to 8090 by default after being configured. Therefore, you need to configure loadbalance. The process is complicated, so specify the expose port
当使用 traefik 时, 配置完 host 后无法直接的访问到对应的服务, 需要额外的配置service, loadbalance.port 才能, 所以建议增加一个 expose port, 指定下默认的服务端口
#### Which issue(s) this PR fixes:
#### Special notes for your reviewer:
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind bug
/area core
#### What this PR does / why we need it:
Reset base Docker image of builder to eclipse-temurin to fix the problem of OOM while building multi-platform Docker image. See https://github.com/halo-dev/halo/actions/runs/6976331252/job/18984676251 for more.
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind bug
/area core
#### What this PR does / why we need it:
See https://github.com/halo-dev/halo/pull/4850#issuecomment-1812068735 for more.
Test steps:
```bash
make -C console build
./gradlew clean build -x check
docker build -t halo:not-find-main-class .
docker run -it --rm -p 8090:8090 -v ~/.halo2:/root/.halo2 halo:not-find-main-class
```
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind cleanup
/area core
#### What this PR does / why we need it:
This PR totally refactor project structure for a better plugin development. Now we can maintain and publish api and platform modules at Halo application side, which will be references by plugins.
Currently, we can execute command `./gradlew clean publish` to publish api and platform modules into **local** Maven repository, so that we can refer these dependencies (`run.halo.tools.platform:plugin:2.4.0-SNAPSHOT` and `run.halo.app:api:2.4.0-SNAPSHOT`) in plugin projects.
I will make another pull request to publish api library and platforms into Maven central repository.
**Modules explanation**:
- API module contains common classes which might be used by plugins.
- Plugin Platform module contains dependency declarations of other plugin API modules.
- Application Platform module contains dependency declarations application module might uses.
If we want to build application only(exclude check and jar), we have to execute the command below:
```bash
./gradlew clean :application:build -x :application:check -x :application:jar
```
The executable Jar will be generated at folder `application/build/libs/`.
If we want to build a Docker image, we could execute the command below:
```bash
docker build -t johnniang/halo:project-structure .
# Test the Docker image
docker run -it --rm -p8090:8090 johnniang/halo:project-structure
```
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/2730
#### Special notes for your reviewer:
#### Does this PR introduce a user-facing change?
```release-note
重构项目结构
```
#### What type of PR is this?
/kind improvement
/area core
#### What this PR does / why we need it:
Now, we can pass command-line arguments while using Docker. Please refer to <https://github.com/halo-dev/halo/issues/2902>.
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/2902
#### Special notes for your reviewer:
Steps to test:
1. Run Halo with command-line arguments:
```bash
docker run --rm -it -p6666:6666 johnniang/halo:support-command-line-args --server.port=6666
```
1. Request <http://localhost:6666>
```bash
curl -v http://localhost:6666
```
#### Does this PR introduce a user-facing change?
<!--
如果当前 Pull Request 的修改不会造成用户侧的任何变更,在 `release-note` 代码块儿中填写 `NONE`。
否则请填写用户侧能够理解的 Release Note。如果当前 Pull Request 包含破坏性更新(Break Change),
Release Note 需要以 `action required` 开头。
If no, just write "NONE" in the release-note block below.
If yes, a release note is required:
Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required".
-->
```release-note
支持命令行参数启动 Halo
```
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.1.x
#### What this PR does / why we need it:
Force to add environment variables `HALO_WORK_DIR` and `SPRING_CONFIG_LOCATION` into Dockerfile. After that, we can configure `application.yaml` in working directory as we want.
Please note that we can not configure Halo working directory in `/root/.halo2/application.yaml` directly. Use environment variable `HALO_WORK_DIR` instead.
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/2812
#### Special notes for your reviewer:
Steps to test:
1. Prepare custom configuration
```bash
mkdir -p halo2
cat <<EOF > halo2/application.yaml
server:
port: 12345
EOF
```
2. Start up Halo using Docker
```bash
docker run -it --rm -p12345:12345 -v `pwd`/halo2:/root/.halo2 johnniang/halo:configure-halo-in-work-dir
```
3. Request http://localhost:12345
```bash
curl -v localhost:12345
```
#### Does this PR introduce a user-facing change?
```release-note
支持在工作目录添加自定义配置
```
* Refactor Dockerfile with layered jar
* Add projectVersion print task
* Refactor docker build process
* Remove aliyun maven mirror
* Correct multi platforms list
* Correct multi platforms list again
* Make docker platforms configurable
* 1196 refactor/ci (#3)
* Remove .travis.yml
* Refactor github action partially
* Fix yaml syntax error
* Add run command for every step
* Set current branch name into halo.yml temporarily
* Test validation.yml
* Add upload-release-asset step into release.yml
* Perfect release.yml
* Fix indent error
* Refactor on condition in release.yml
* Refactor on condition in validation.yml
* Fix release.yml
* Fix upload_url value set
* Fix environment set error
* Change artifact variable from output into global environment
* Fix deprecated environment set method
* Fix environment variable set error
* Change assert_content_type with application/zip
* Refactor upload release step
* Fix release id set
* Fix release id set again
* Fix syntax error
* Refactor upload process
* Refactor halo ci
* Make build step rely on check step
* Inspect docker action
* Inspect docker action again
* Refine bootBuildImage config
* Refactor bootBuildImage config and halo ci
* Fix download artifact path error
* Fix docker image name concat error
* Remove downloaded files inspect tips
* Update spring boot version and source compatibility version
* Rearrange some configs
* Upgrade swagger to 3.0.0
* Make swagger configurable
* Make swagger-ui.html path backward compatible
* Change jdk version into 11 in ci/cd scripts and Dockerfile