Commit Graph

34 Commits (8d71fc39668157dbb2b7d345c2ec85a43a8135d4)

Author SHA1 Message Date
croatialu 2bcab942c1
chore: specify expose port in dockerfile (#5820)
#### 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
```
2024-04-29 10:37:26 +00:00
mashirot e4b2e07cc8
chore: rm deprecated attr MAINTAINER (#5791) 2024-04-25 00:10:47 +08:00
John Niang 5fdf6c0af1 Upgrade to JDK/JRE 21 when building Docker image
Signed-off-by: John Niang <johnniang@foxmail.com>
2024-02-06 16:50:26 +08:00
John Niang 64fed0cacc
Reset base Docker image of builder to eclipse-temurin (#4910)
#### 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
```
2023-11-24 08:04:06 +00:00
John Niang e5dc116279 Add CARGO_NET_GIT_FETCH_WITH_CLI env into Dockerfile to prevent OOM error during building multi-platforms Docker image 2023-11-23 23:33:36 +08:00
Ryan Wang 8f3ed637ad chore: use ibm-semeru-runtimes to replace eclipse-temurin as the base image
Signed-off-by: Ryan Wang <i@ryanc.cc>
2023-11-23 14:29:29 +08:00
John Niang 4216d95cd6
Fix the problem of unable to start application through Docker image (#4859)
#### 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
```
2023-11-16 11:36:07 +00:00
John Niang c400c85922
Refactor project structure for a better development (#3552)
#### 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
重构项目结构
```
2023-03-23 08:02:33 +00:00
John Niang 843dcc0e4a
Support command-line arguments running with Docker (#2942)
#### 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
```
2022-12-14 15:12:22 +00:00
John Niang 3033ceb1ec
Support configuring Halo in working directory (#2935)
#### 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
支持在工作目录添加自定义配置
```
2022-12-14 09:16:18 +00:00
John Niang 5953d2201d
Refactor CICD for Halo next (#2236) 2022-07-12 11:01:00 +08:00
John Niang bcf26fdc50
Refactor Dockerfile with layered jar (#1248)
* 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
2021-01-27 23:55:57 +08:00
John Niang 7cb4f3464a
Replace travis ci with github action (#1212)
* 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
2021-01-03 22:05:39 +08:00
John Niang 30e28b5257
Upgrade dependencies (#1184)
* 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
2020-12-08 01:20:19 +08:00
OnFr d3953fe864
fix: #1028 (#1094) 2020-09-30 00:06:01 +08:00
IJKZEN 426bbf6e83
feat(jvm): change jvm to openj9 to reduce memory 2019-11-26 10:09:39 +08:00
ruibaby f2642feb35 Update readme. 2019-09-26 14:56:38 +08:00
ruibaby f371ec3e0d Fixed #283 2019-09-03 21:23:33 +08:00
ruibaby 1a6e5c7127 Update Dockerfile. 2019-07-16 17:40:32 +08:00
johnniang 99c11ac57d Change openjdk:8-jdk-alpine to openjdk:8-jre-alpine in Dockerfile 2019-05-22 23:44:03 +08:00
johnniang 67a09a9123 Let halo version off Dockerfile 2019-05-10 16:12:24 +08:00
johnniang 3b888d3d89 Update copy filename of the jar file 2019-05-09 01:41:30 +08:00
johnniang 8b97f0422e Update Dockerfile 2019-05-09 01:39:04 +08:00
johnniang 357f094057 Add Dockerfile support 2019-05-07 17:27:49 +08:00
ruibaby 9a8ade7b17 Update Dockerfile. 2019-04-19 16:53:40 +08:00
ruibaby 2db1669e3f Change base package to run.halo.app. 2019-04-03 20:06:59 +08:00
johnniang 93918e26e6 Add logging level config in Dockerfile 2019-03-01 23:25:17 +08:00
ruibaby 18ef6f54c5 🐛 修复 Docker 构建问题 2019-01-16 19:16:43 +08:00
RYAN0UP_ d636e3b8b5
Update Dockerfile 2018-12-29 00:26:52 +08:00
RYAN0UP_ e2ffae2463
Update Dockerfile 2018-12-29 00:26:00 +08:00
ruibaby 367ec29183 🐛 修复菜单管理页面的异常 2018-12-28 22:50:31 +08:00
ruibaby 12e8e68655 🐛 fixed #55 2018-12-05 17:17:24 +08:00
ruibaby 2d2274a4ea 🎨 docker自动集成 2018-10-18 20:24:51 +08:00
ruibaby 1167bceb6c add Dockerfile 2018-10-18 06:04:06 +08:00