Compare commits
21 Commits
93f49e9326
...
renovate/u
Author | SHA1 | Date | |
---|---|---|---|
cafbbe4215 | |||
0ad26585e4 | |||
2a614a94de | |||
56000f7e4b | |||
05c2272385 | |||
f31493fabf | |||
672624abd5 | |||
970b918b8d | |||
814a81d74e | |||
e037c69a5e | |||
43f6b0c56e | |||
1296ce3722 | |||
2039f673ad | |||
ca49cf2a51 | |||
14ce3e887c | |||
b893f23ba5 | |||
4a5b7a7697 | |||
684a894076 | |||
fef45ad7f7 | |||
f5f3382d7e | |||
3e40c88dac |
@ -13,17 +13,17 @@ on:
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Get branch name
|
||||
id: branch-name
|
||||
uses: tj-actions/branch-names@v7
|
||||
uses: tj-actions/branch-names@v8
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Restore Docker Cache
|
||||
uses: actions/cache@v3
|
||||
uses: actions/cache@v4
|
||||
id: docker-cache
|
||||
with:
|
||||
path: /usr/bin/docker
|
||||
@ -47,14 +47,14 @@ jobs:
|
||||
password: ${{ secrets.REPO_TOKEN }}
|
||||
|
||||
- name: Restore Docker Build Cache
|
||||
uses: actions/cache@v3
|
||||
uses: actions/cache@v4
|
||||
id: build-cache
|
||||
with:
|
||||
path: /tmp/.buildx-cache
|
||||
key: ${{ runner.os }}-buildx
|
||||
|
||||
- name: Build and Push (Latest)
|
||||
uses: docker/build-push-action@v5
|
||||
uses: docker/build-push-action@v6
|
||||
if: steps.branch-name.outputs.current_branch == 'master'
|
||||
with:
|
||||
push: true
|
||||
@ -64,7 +64,7 @@ jobs:
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||
|
||||
- name: Build and Push (Other Branches)
|
||||
uses: docker/build-push-action@v5
|
||||
uses: docker/build-push-action@v6
|
||||
if: steps.branch-name.outputs.current_branch != 'master'
|
||||
with:
|
||||
push: true
|
||||
|
20
Dockerfile
20
Dockerfile
@ -1,5 +1,5 @@
|
||||
# Stage 1: Build Nginx
|
||||
FROM alpine:3.18.5 as builder
|
||||
FROM alpine:3.20.3 as builder
|
||||
|
||||
# Install build dependencies and required tools
|
||||
RUN apk update && apk upgrade && \
|
||||
@ -7,12 +7,14 @@ RUN apk update && apk upgrade && \
|
||||
|
||||
# Download and build the latest version of Nginx from source
|
||||
WORKDIR /tmp
|
||||
RUN wget https://nginx.org/download/nginx-1.25.3.tar.gz
|
||||
RUN tar -xzvf nginx-1.25.3.tar.gz
|
||||
WORKDIR /tmp/nginx-1.25.3
|
||||
RUN ./configure --prefix=/usr/local/nginx --sbin-path=/usr/local/sbin/nginx --conf-path=/etc/nginx/nginx.conf
|
||||
RUN make
|
||||
RUN make install
|
||||
RUN wget https://nginx.org/download/nginx-1.27.0.tar.gz && \
|
||||
tar -xzvf nginx-1.27.0.tar.gz && \
|
||||
cd nginx-1.27.0 && \
|
||||
./configure --prefix=/usr/local/nginx --sbin-path=/usr/local/sbin/nginx --conf-path=/etc/nginx/nginx.conf && \
|
||||
make > /dev/null 2>&1 && \
|
||||
make install > /dev/null 2>&1 && \
|
||||
make_status=$? && \
|
||||
if [ $make_status -ne 0 ]; then echo "Nginx build failed"; exit $make_status; fi
|
||||
|
||||
# Cleanup unnecessary files
|
||||
RUN rm -rf /tmp/*
|
||||
@ -29,7 +31,7 @@ COPY ./docker/index.html /tmp/index.html
|
||||
COPY ./public /tmp/public
|
||||
|
||||
# Stage 2: Create a smaller production image
|
||||
FROM alpine:3.18.5
|
||||
FROM alpine:3.20.3
|
||||
|
||||
# Copy Nginx and PHP-FPM binaries and configurations from the builder stage
|
||||
COPY --from=builder /usr/local/nginx /usr/local/nginx
|
||||
@ -42,7 +44,7 @@ COPY --from=builder /tmp/public /tmp/public
|
||||
|
||||
# Install runtime dependencies
|
||||
RUN apk update && apk upgrade && \
|
||||
apk add --no-cache php81 php81-fpm php81-gd pcre
|
||||
apk add --no-cache php83 php83-fpm php83-gd pcre
|
||||
|
||||
# Cleanup unnecessary files
|
||||
RUN rm -rf /var/cache/apk/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
# ShareX Upload Script
|
||||
# ShareX Uploader
|
||||
|
||||
This PHP script allows you to easily upload ShareX screenshots and videos. It includes token authentication for security and can handle various image file types by converting them to WebP format for efficient storage.
|
||||
|
||||
|
@ -23,15 +23,15 @@ else
|
||||
fi
|
||||
|
||||
# Letting php know that we are running in docker
|
||||
echo "env[DOCKER] = true" >> /etc/php81/php-fpm.d/www.conf
|
||||
echo "clear_env = no" >> /etc/php81/php-fpm.d/www.conf
|
||||
echo "env[DOCKER] = true" >> /etc/php83/php-fpm.d/www.conf
|
||||
echo "clear_env = no" >> /etc/php83/php-fpm.d/www.conf
|
||||
|
||||
# Create the directory for PHP socket
|
||||
mkdir -p /run/php
|
||||
|
||||
# Set php-fpm to listen on socket
|
||||
touch /run/php/php.sock
|
||||
sed -i 's/^listen = .*/listen = \/run\/php\/php.sock/' /etc/php81/php-fpm.d/www.conf
|
||||
sed -i 's/^listen = .*/listen = \/run\/php\/php.sock/' /etc/php83/php-fpm.d/www.conf
|
||||
|
||||
echo "Setting permissions for upload script"
|
||||
chmod 777 /var/www/html/upload.php
|
||||
@ -39,15 +39,15 @@ chmod 777 /var/www/html/upload.php
|
||||
echo "Setting max upload size to ${MAX_UPLOAD_SIZE}"
|
||||
|
||||
# Set max upload size for php
|
||||
sed -i "s/^upload_max_filesize = .*/upload_max_filesize = ${MAX_UPLOAD_SIZE}/" /etc/php81/php.ini
|
||||
sed -i "s/^post_max_size = .*/post_max_size = ${MAX_UPLOAD_SIZE}/" /etc/php81/php.ini
|
||||
sed -i "s/^upload_max_filesize = .*/upload_max_filesize = ${MAX_UPLOAD_SIZE}/" /etc/php83/php.ini
|
||||
sed -i "s/^post_max_size = .*/post_max_size = ${MAX_UPLOAD_SIZE}/" /etc/php83/php.ini
|
||||
|
||||
# Set max upload size for nginx
|
||||
sed -i "s/client_max_body_size 500M;/client_max_body_size ${MAX_UPLOAD_SIZE};/" /etc/nginx/nginx.conf
|
||||
|
||||
function start() {
|
||||
echo "Starting PHP & Nginx"
|
||||
php-fpm81 &&
|
||||
php-fpm83 &&
|
||||
chmod 777 /run/php/php.sock &&
|
||||
/usr/local/sbin/nginx -g 'daemon off;'
|
||||
}
|
||||
|
@ -1,6 +1,3 @@
|
||||
{
|
||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||
"extends": [
|
||||
"local>Fascinated/renovate-config"
|
||||
]
|
||||
"extends": ["config:recommended", ":dependencyDashboard"]
|
||||
}
|
Reference in New Issue
Block a user