refactor(7.4): 🦄 将 apache 改为了 caddy
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone Build is passing

This commit is contained in:
李东云
2022-05-10 22:06:17 +08:00
parent e4874522c9
commit 5fa550aba3
2 changed files with 20 additions and 43 deletions

View File

@@ -1,7 +1,7 @@
# ---
# kind: pipeline
# type: docker
# name: apache
# name: caddy
# clone:
# depth: 1
@@ -19,11 +19,11 @@
# - "stark.doylee.cn/library/flarum"
# tags:
# - ${DRONE_BUILD_NUMBER}
# - 8.1-apache
# - 8-apache
# - apache
# - 8.1-caddy
# - 8-caddy
# - caddy
# - latest
# target: apache-latest
# target: caddy-latest
# registry: stark.doylee.cn
# mirror: https://p2t7g3ky.mirror.aliyuncs.com
# when:
@@ -32,7 +32,7 @@
# ---
# kind: pipeline
# type: docker
# name: 7.3-apache
# name: 7.3-caddy
# clone:
# depth: 1
@@ -47,11 +47,11 @@
# password: DhmbcQyu7I5uaUfWbzcedbDGB0gfhuFR
# repo: stark.doylee.cn/library/flarum
# cache_from:
# - "stark.doylee.cn/library/flarum:7.3-apache"
# - "stark.doylee.cn/library/flarum:7.3-caddy"
# tags:
# - ${DRONE_BUILD_NUMBER}
# - 7.3-apache
# target: apache-73
# - 7.3-caddy
# target: caddy-73
# registry: stark.doylee.cn
# mirror: https://p2t7g3ky.mirror.aliyuncs.com
# when:
@@ -60,7 +60,7 @@
# ---
kind: pipeline
type: docker
name: 7-apache
name: 7-caddy
clone:
depth: 1
@@ -75,11 +75,11 @@ steps:
password: DhmbcQyu7I5uaUfWbzcedbDGB0gfhuFR
repo: stark.doylee.cn/library/flarum
cache_from:
- "stark.doylee.cn/library/flarum:7-apache"
- "stark.doylee.cn/library/flarum:7-caddy"
tags:
- ${DRONE_BUILD_NUMBER}
- 7.4-apache
- 7-apache
- 7.4-caddy
- 7-caddy
registry: stark.doylee.cn
mirror: https://p2t7g3ky.mirror.aliyuncs.com
dockerfile: 7.4/Dockerfile

View File

@@ -1,39 +1,16 @@
FROM php:7-apache
# 系统基础配置
USER root
WORKDIR /var/www
ENV LC_ALL C.UTF-8
ENV LANG C.UTF-8
RUN sed -i 's/\(security\|deb\).debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list \
&& ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& apt update \
&& apt dist-upgrade -y \
&& apt autoremove -y \
&& apt autoclean -y
# apache 基本配置
RUN sed -ri -e 's!/var/www/html!/var/www/public!g' /etc/apache2/sites-available/*.conf \
&& echo 'ServerName localhost' >> /etc/apache2/apache2.conf \
&& chown -R www-data:www-data /var/www \
&& a2enmod rewrite
FROM stark.doylee.cn/library/php:7-caddy
# gd pdo_mysql zip
RUN apt install -y \
RUN apk add --no-cache \
libzip-dev \
zip \
unzip \
# zip \
# unzip \
libpng-dev \
zlib1g-dev \
libgmp-dev \
# zlib1g-dev \
# libgmp-dev \
&& docker-php-ext-configure gd \
&& docker-php-ext-install -j$(nproc) gd \
&& docker-php-ext-install pdo_mysql \
&& docker-php-ext-install zip \
&& docker-php-source delete \
&& rm -rf /var/lib/apt/lists/*
# php 环境配置
COPY --from=composer /usr/bin/composer /usr/bin/composer
&& chown -R www-data:www-data /srv