Compare commits
4 Commits
99fccde008
...
main
Author | SHA1 | Date | |
---|---|---|---|
b79281d857
|
|||
7d4df39457
|
|||
58fe310d58
|
|||
7fe695785f
|
@ -1,14 +1,14 @@
|
|||||||
services:
|
services:
|
||||||
nextcloud:
|
fpm:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: nextcloud.Dockerfile
|
dockerfile: fpm.Dockerfile
|
||||||
args:
|
args:
|
||||||
NEXTCLOUD_VERSION: ${NEXTCLOUD_VERSION}
|
NEXTCLOUD_VERSION: ${NEXTCLOUD_VERSION}
|
||||||
NEXTCLOUD_URL: ${NEXTCLOUD_URL}
|
NEXTCLOUD_URL: ${NEXTCLOUD_URL}
|
||||||
NEXTCLOUD_FILENAME: ${NEXTCLOUD_FILENAME}
|
NEXTCLOUD_FILENAME: ${NEXTCLOUD_FILENAME}
|
||||||
hostname: nextcloud
|
hostname: nextcloud
|
||||||
image: git.shihaam.dev/dockerfiles/nextcloud/nextcloud:${NEXTCLOUD_VERSION}
|
image: git.shihaam.dev/dockerfiles/nextcloud/fpm:${NEXTCLOUD_VERSION}
|
||||||
nginx:
|
nginx:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
|
@ -9,6 +9,7 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$(ls -A /var/www/html/apps)" ]; then
|
if [ -z "$(ls -A /var/www/html/apps)" ]; then
|
||||||
|
mkdir -p /var/www/html/apps/
|
||||||
cp -r /var/www/default_apps/* /var/www/html/apps/
|
cp -r /var/www/default_apps/* /var/www/html/apps/
|
||||||
echo "Copied default apps to /var/www/html/apps because it was empty."
|
echo "Copied default apps to /var/www/html/apps because it was empty."
|
||||||
else
|
else
|
||||||
|
@ -28,7 +28,7 @@ RUN mv /var/www/html/config/config.sample.php /var/www/default_config.sample.php
|
|||||||
|
|
||||||
# copy php config
|
# copy php config
|
||||||
COPY php.ini /usr/local/etc/php/php.ini
|
COPY php.ini /usr/local/etc/php/php.ini
|
||||||
|
COPY php-fpm.conf /usr/local/etc/php-fpm.conf
|
||||||
# copy and setup entrypoint
|
# copy and setup entrypoint
|
||||||
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
|
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
|
||||||
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
|
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
|
@ -30,7 +30,7 @@ server {
|
|||||||
# set max upload size and increase upload timeout:
|
# set max upload size and increase upload timeout:
|
||||||
client_max_body_size 4G;
|
client_max_body_size 4G;
|
||||||
client_body_timeout 600s;
|
client_body_timeout 600s;
|
||||||
fastcgi_buffers 64 4K;
|
fastcgi_buffers 64 16K;
|
||||||
fastcgi_read_timeout 300;
|
fastcgi_read_timeout 300;
|
||||||
fastcgi_send_timeout 300;
|
fastcgi_send_timeout 300;
|
||||||
fastcgi_connect_timeout 300;
|
fastcgi_connect_timeout 300;
|
||||||
|
21
.build/php-fpm.conf
Normal file
21
.build/php-fpm.conf
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
pid = /var/run/php-fpm.pid
|
||||||
|
error_log = /dev/stderr
|
||||||
|
emergency_restart_threshold = 10
|
||||||
|
emergency_restart_interval = 1m
|
||||||
|
process_control_timeout = 10s
|
||||||
|
|
||||||
|
; In www.conf or your pool configuration file
|
||||||
|
[www]
|
||||||
|
; Process manager settings
|
||||||
|
pm = dynamic
|
||||||
|
pm.max_children = 50
|
||||||
|
pm.start_servers = 5
|
||||||
|
pm.min_spare_servers = 5
|
||||||
|
pm.max_spare_servers = 35
|
||||||
|
pm.max_requests = 500
|
||||||
|
|
||||||
|
; Timeout settings
|
||||||
|
request_terminate_timeout = 300
|
||||||
|
|
||||||
|
[global]
|
||||||
|
include=etc/php-fpm.d/*.conf
|
1816
.build/php.ini
1816
.build/php.ini
File diff suppressed because it is too large
Load Diff
37
.gitea/workflows/docker-build.yml
Normal file
37
.gitea/workflows/docker-build.yml
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
name: Build and Push Docker Images
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- master
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
docker:
|
||||||
|
name: Build and Push Docker Images
|
||||||
|
runs-on: builder
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Build Docker images
|
||||||
|
working-directory: .build/prod
|
||||||
|
run: docker compose build
|
||||||
|
|
||||||
|
- name: Login to Docker Registry
|
||||||
|
if: github.event_name != 'pull_request'
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
registry: ${{ vars.DOCKER_REGISTRY_URL }}
|
||||||
|
username: ${{ vars.DOCKER_REGISTRY_USER }}
|
||||||
|
password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
|
||||||
|
|
||||||
|
- name: Push Docker images
|
||||||
|
if: github.event_name != 'pull_request'
|
||||||
|
working-directory: .build/prod
|
||||||
|
run: docker compose push
|
Reference in New Issue
Block a user