This commit is contained in:
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 registry.xiaokeaii.top/hyperf:1.0
|
|
||||||
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"]
|
|
||||||
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@@ -9,4 +9,4 @@ jobs:
|
|||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cp -rf .github/workflows/Dockerfile . && docker build -t hyperf .
|
run: ls -la
|
||||||
|
|||||||
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
|
|
||||||
Reference in New Issue
Block a user