。。
This commit is contained in:
@@ -1,52 +0,0 @@
|
||||
# Dev Container Dockerfile
|
||||
#
|
||||
# @link https://www.hyperf.io
|
||||
# @document https://hyperf.wiki
|
||||
# @contact group@hyperf.io
|
||||
# @license https://github.com/hyperf/hyperf/blob/master/LICENSE
|
||||
|
||||
FROM hyperf/hyperf:8.3-alpine-v3.19-swoole
|
||||
LABEL maintainer="Hyperf Developers <group@hyperf.io>" version="1.0" license="MIT" app.name="Hyperf"
|
||||
|
||||
##
|
||||
# ---------- env settings ----------
|
||||
##
|
||||
# --build-arg timezone=Asia/Shanghai
|
||||
ARG timezone
|
||||
|
||||
ENV TIMEZONE=${timezone:-"Asia/Shanghai"} \
|
||||
APP_ENV=dev \
|
||||
SCAN_CACHEABLE=(false)
|
||||
|
||||
# update
|
||||
RUN set -ex \
|
||||
# show php version and extensions
|
||||
&& php -v \
|
||||
&& php -m \
|
||||
&& php --ri swoole \
|
||||
# ---------- some config ----------
|
||||
&& cd /etc/php* \
|
||||
# - config PHP
|
||||
&& { \
|
||||
echo "upload_max_filesize=128M"; \
|
||||
echo "post_max_size=128M"; \
|
||||
echo "memory_limit=1G"; \
|
||||
echo "date.timezone=${TIMEZONE}"; \
|
||||
} | tee conf.d/99_overrides.ini \
|
||||
# - config timezone
|
||||
&& ln -sf /usr/share/zoneinfo/${TIMEZONE} /etc/localtime \
|
||||
&& echo "${TIMEZONE}" > /etc/timezone \
|
||||
# ---------- clear works ----------
|
||||
&& rm -rf /var/cache/apk/* /tmp/* /usr/share/man \
|
||||
&& echo -e "\033[42;37m Build Completed :).\033[0m\n"
|
||||
|
||||
WORKDIR /opt/www
|
||||
|
||||
# Composer Cache
|
||||
# COPY ./composer.* /opt/www/
|
||||
# RUN composer install --no-dev --no-scripts
|
||||
|
||||
COPY . /opt/www
|
||||
RUN composer install && php bin/hyperf.php
|
||||
|
||||
EXPOSE 9501
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"build": {
|
||||
"context": "..",
|
||||
"dockerfile": "./Dockerfile"
|
||||
},
|
||||
"forwardPorts": [9501]
|
||||
}
|
||||
54
.github/workflows/Dockerfile
vendored
54
.github/workflows/Dockerfile
vendored
@@ -1,54 +0,0 @@
|
||||
# Default Dockerfile
|
||||
#
|
||||
# @link https://www.hyperf.io
|
||||
# @document https://hyperf.wiki
|
||||
# @contact group@hyperf.io
|
||||
# @license https://github.com/hyperf/hyperf/blob/master/LICENSE
|
||||
|
||||
FROM hyperf/hyperf:8.3-alpine-v3.19-swoole
|
||||
LABEL maintainer="Hyperf Developers <group@hyperf.io>" version="1.0" license="MIT" app.name="Hyperf"
|
||||
|
||||
##
|
||||
# ---------- env settings ----------
|
||||
##
|
||||
# --build-arg timezone=Asia/Shanghai
|
||||
ARG timezone
|
||||
|
||||
ENV TIMEZONE=${timezone:-"Asia/Shanghai"} \
|
||||
APP_ENV=prod \
|
||||
SCAN_CACHEABLE=(true)
|
||||
|
||||
# update
|
||||
RUN set -ex \
|
||||
# show php version and extensions
|
||||
&& php -v \
|
||||
&& php -m \
|
||||
&& php --ri swoole \
|
||||
# ---------- some config ----------
|
||||
&& cd /etc/php* \
|
||||
# - config PHP
|
||||
&& { \
|
||||
echo "upload_max_filesize=128M"; \
|
||||
echo "post_max_size=128M"; \
|
||||
echo "memory_limit=1G"; \
|
||||
echo "date.timezone=${TIMEZONE}"; \
|
||||
} | tee conf.d/99_overrides.ini \
|
||||
# - config timezone
|
||||
&& ln -sf /usr/share/zoneinfo/${TIMEZONE} /etc/localtime \
|
||||
&& echo "${TIMEZONE}" > /etc/timezone \
|
||||
# ---------- clear works ----------
|
||||
&& rm -rf /var/cache/apk/* /tmp/* /usr/share/man \
|
||||
&& echo -e "\033[42;37m Build Completed :).\033[0m\n"
|
||||
|
||||
WORKDIR /opt/www
|
||||
|
||||
# Composer Cache
|
||||
# COPY ./composer.* /opt/www/
|
||||
# RUN composer install --no-dev --no-scripts
|
||||
|
||||
COPY . /opt/www
|
||||
RUN print "\n" | composer install -o && php bin/hyperf.php
|
||||
|
||||
EXPOSE 9501
|
||||
|
||||
ENTRYPOINT ["php", "/opt/www/bin/hyperf.php", "start"]
|
||||
12
.github/workflows/build.yml
vendored
12
.github/workflows/build.yml
vendored
@@ -1,12 +0,0 @@
|
||||
name: Build Docker
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
- name: Build
|
||||
run: cp -rf .github/workflows/Dockerfile . && docker build -t hyperf .
|
||||
25
.github/workflows/release.yml
vendored
25
.github/workflows/release.yml
vendored
@@ -1,25 +0,0 @@
|
||||
on:
|
||||
push:
|
||||
# Sequence of patterns matched against refs/tags
|
||||
tags:
|
||||
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
|
||||
|
||||
name: Release
|
||||
|
||||
jobs:
|
||||
release:
|
||||
name: Release
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
- name: Create Release
|
||||
id: create_release
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ github.ref }}
|
||||
release_name: Release ${{ github.ref }}
|
||||
draft: false
|
||||
prerelease: false
|
||||
@@ -4,7 +4,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\JsonRpc\Service;
|
||||
|
||||
use Aether\AetherCrudService;
|
||||
use Aether\AetherModel;
|
||||
use Aether\AetherValidator;
|
||||
use Aether\Exception\BusinessException;
|
||||
@@ -14,10 +13,10 @@ use App\Model\Campus;
|
||||
use App\Model\Teacher;
|
||||
use App\Validator\CampusValidator;
|
||||
use App\Validator\TeacherValidator;
|
||||
use DHD\Contract\DataServiceInterface;
|
||||
use Exception;
|
||||
use Hyperf\Di\Annotation\Inject;
|
||||
use Hyperf\RpcServer\Annotation\RpcService;
|
||||
use DHD\Contract\DataServiceInterface;
|
||||
|
||||
#[RpcService(name: 'DataService', server: 'jsonrpc-http', protocol: 'jsonrpc-http', publishTo: 'nacos')]
|
||||
class DataService implements DataServiceInterface
|
||||
@@ -45,7 +44,7 @@ class DataService implements DataServiceInterface
|
||||
*/
|
||||
public function getCampuses(array $data): array
|
||||
{
|
||||
return $this->campusService->list($data);
|
||||
return $this->campusModel->list($data);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -135,7 +134,7 @@ class DataService implements DataServiceInterface
|
||||
*/
|
||||
public function getTeachers(array $data): array
|
||||
{
|
||||
return $this->teacherService->list($data);
|
||||
return $this->teacherModel->list($data);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
8
composer.lock
generated
8
composer.lock
generated
@@ -12,7 +12,7 @@
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://gitee.com/devAether666/aether-hyperf.git",
|
||||
"reference": "92a7f6c9a0b7b1addff990dee69a74977a1f4db2"
|
||||
"reference": "d7113d5d2cf7702b7f1d07143dac235bad67704a"
|
||||
},
|
||||
"require": {
|
||||
"hyperf/db-connection": "~3.1.0",
|
||||
@@ -52,7 +52,7 @@
|
||||
}
|
||||
],
|
||||
"description": "Aether Hyperf Common Components",
|
||||
"time": "2025-10-16T11:02:15+00:00"
|
||||
"time": "2025-10-17T07:31:39+00:00"
|
||||
},
|
||||
{
|
||||
"name": "carbonphp/carbon-doctrine-types",
|
||||
@@ -129,7 +129,7 @@
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://gitee.com/devAether666/dhd-contract.git",
|
||||
"reference": "c95c40536f0ff311cf5e0fd6bfaefe6f752f0726"
|
||||
"reference": "012e51f5322cf073083640680450ad4c1d11e006"
|
||||
},
|
||||
"require": {
|
||||
"hyperf/database": "~3.1.0",
|
||||
@@ -157,7 +157,7 @@
|
||||
}
|
||||
],
|
||||
"description": "DHD Micro Service Contract Package",
|
||||
"time": "2025-10-16T10:15:18+00:00"
|
||||
"time": "2025-10-17T02:02:43+00:00"
|
||||
},
|
||||
{
|
||||
"name": "doctrine/deprecations",
|
||||
|
||||
Reference in New Issue
Block a user