diff --git a/rxr_halo/.env b/rxr_halo/.env new file mode 100644 index 0000000..9b51968 --- /dev/null +++ b/rxr_halo/.env @@ -0,0 +1,2 @@ +HALO_PATH=/root/halo +EXT_URL='https://blog.zziyu.cn' \ No newline at end of file diff --git a/rxr_halo/docker-compose.yml b/rxr_halo/docker-compose.yml new file mode 100644 index 0000000..73d537e --- /dev/null +++ b/rxr_halo/docker-compose.yml @@ -0,0 +1,52 @@ +version: "3" + +services: + halo: + image: registry.fit2cloud.com/halo/halo:2.20 + restart: on-failure:3 + depends_on: + halodb: + condition: service_healthy + networks: + halo_network: + volumes: + - ${HALO_PATH}/halo2:/root/.halo2 + ports: + - "8090:8090" + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:8090/actuator/health/readiness"] + interval: 30s + timeout: 5s + retries: 5 + start_period: 30s + environment: + # JVM 参数,默认为 -Xmx256m -Xms256m,可以根据实际情况做调整,置空表示不添加 JVM 参数 + - JVM_OPTS=-Xmx256m -Xms256m + command: + - --spring.r2dbc.url=r2dbc:pool:postgresql://halodb/halo + - --spring.r2dbc.username=halo + # PostgreSQL 的密码,请保证与下方 POSTGRES_PASSWORD 的变量值一致。 + - --spring.r2dbc.password=openpostgresql + - --spring.sql.init.platform=postgresql + # 外部访问地址,请根据实际需要修改 + - --halo.external-url=${EXT_URL} + halodb: + image: postgres:15.4 + restart: on-failure:3 + networks: + halo_network: + volumes: + - ${HALO_PATH}/db:/var/lib/postgresql/data + healthcheck: + test: [ "CMD", "pg_isready" ] + interval: 10s + timeout: 5s + retries: 5 + environment: + - POSTGRES_PASSWORD=openpostgresql + - POSTGRES_USER=halo + - POSTGRES_DB=halo + - PGUSER=halo + +networks: + halo_network: \ No newline at end of file