diff --git a/.woodpecker/build.yml b/.woodpecker/build.yml new file mode 100644 index 0000000..db5d3b4 --- /dev/null +++ b/.woodpecker/build.yml @@ -0,0 +1,21 @@ +matrix: + PHP_VERSION: + - 7.4 + - 8.0 + - 8.1 + - 8.2 +pipeline: + image-build: + image: plugins/docker + settings: + registry: techio.dev + repo: techio.dev/${CI_REPO} + tags: + - ${PHP_VERSION} + build_args: + - PHP_VERSION=${PHP_VERSION} + username: deploy + password: + from_secret: deploy_password +when: + event: tag diff --git a/Caddyfile b/Caddyfile new file mode 100644 index 0000000..16a1e7e --- /dev/null +++ b/Caddyfile @@ -0,0 +1,17 @@ +{ + supervisor { + php-fpm { + dir /var/www/html + } + } +} +:80 { + root * /var/www/html + php_fastcgi 127.0.0.1:9000 + encode gzip + file_server + rewrite { + if {path} not_match ^\/wp-admin + to {path} {path}/ /index.php?_url={uri} + } +} \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..9c9920e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +FROM caddy:builder-alpine as caddy +RUN xcaddy build --with github.com/baldinof/caddy-supervisor@v0.6.0 +ARG PHP_VERSION=7.4 +FROM php:${PHP_VERSION}-fpm-alpine +COPY --from=caddy /usr/bin/caddy /usr/bin +COPY Caddyfile /usr/local/etc/caddy/Caddyfile +COPY php.ini /usr/local/etc/php/conf.d +EXPOSE 80 +CMD caddy run --config /usr/local/etc/caddy/Caddyfile diff --git a/php.ini b/php.ini new file mode 100644 index 0000000..539c79d --- /dev/null +++ b/php.ini @@ -0,0 +1,5 @@ +upload_max_filesize = 1024M +post_max_size = 1024M +max_execution_time = 3600 +memory_limit = -1 +max_input_vars = 3000 \ No newline at end of file