1 Unstar Star 0 Fork 4

sky8652 / hyperf-apiPHP

forked from liangguifeng / hyperf-api 
Create your Gitee Account
Explore and code with more than 5 million developers,Free private repositories !:)
Sign up
This repository doesn't specify license. Without author's permission, this code is only for learning and cannot be used for other purposes.
hyperf的api实例,做了用户的登录认证,采用的是jwt做接口的认证,供大家参考 spread retract

Clone or download
Dockerfile 1.59 KB
Copy Edit Web IDE Raw Blame History
liangguifeng authored 2019-10-17 11:28 . update
# Default Dockerfile
#
# @link https://www.hyperf.io
# @document https://doc.hyperf.io
# @contact group@hyperf.io
# @license https://github.com/hyperf-cloud/hyperf/blob/master/LICENSE
FROM hyperf/hyperf:7.2-alpine-cli
LABEL maintainer="Hyperf Developers <group@hyperf.io>" version="1.0" license="MIT"
##
# ---------- env settings ----------
##
# --build-arg timezone=Asia/Shanghai
ARG timezone
ENV TIMEZONE=${timezone:-"Asia/Shanghai"} \
COMPOSER_VERSION=1.8.6 \
APP_ENV=prod
# update
RUN set -ex \
&& apk update \
# install composer
&& cd /tmp \
&& wget https://github.com/composer/composer/releases/download/${COMPOSER_VERSION}/composer.phar \
&& chmod u+x composer.phar \
&& mv composer.phar /usr/local/bin/composer \
# show php version and extensions
&& php -v \
&& php -m \
# ---------- some config ----------
&& cd /etc/php7 \
# - config PHP
&& { \
echo "upload_max_filesize=100M"; \
echo "post_max_size=108M"; \
echo "memory_limit=1024M"; \
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"
COPY . /opt/www
WORKDIR /opt/www
RUN composer install --no-dev \
&& composer dump-autoload -o \
&& php /opt/www/bin/hyperf.php di:init-proxy
EXPOSE 9501
ENTRYPOINT ["php", "/opt/www/bin/hyperf.php", "start"]

Comment ( 0 )

Sign in for post a comment

PHP
1
https://gitee.com/resourcesplus/hyperf-api.git
git@gitee.com:resourcesplus/hyperf-api.git
resourcesplus
hyperf-api
hyperf-api
master

Search

132457 8cb2edc1 1899542 131848 70c8d3a4 1899542