Compare commits
30 Commits
developmen
...
c2219d60b9
Author | SHA1 | Date | |
---|---|---|---|
c2219d60b9 | |||
64c312bb75 | |||
6354a96024 | |||
febf41c262 | |||
845833c61d | |||
8bcd2c0412 | |||
273dd74cf9 | |||
82900551fd | |||
b806eb43b8 | |||
f8f9809ab0 | |||
6f9602e5b6 | |||
aa6489c971 | |||
353c55a1dd | |||
2a2b8e02a6 | |||
a05a8f973c | |||
a0643f8083 | |||
7a29603a30 | |||
b2b386b33a | |||
f9622e8081 | |||
3e0fc4fd53 | |||
b9cbfef9be | |||
6e71267e6a | |||
e6e4481412 | |||
f3febd737d | |||
780ea18f5b | |||
48265f6d1b | |||
b231e82a95 | |||
5799511916 | |||
4ebb8fafe2 | |||
7bd835de54 |
@ -13,14 +13,14 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
docker:
|
docker:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- name: Get branch name
|
- name: Get branch name
|
||||||
id: branch-name
|
id: branch-name
|
||||||
uses: tj-actions/branch-names@v7
|
uses: tj-actions/branch-names@v7
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Restore Docker Cache
|
- name: Restore Docker Cache
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
@ -38,10 +38,10 @@ jobs:
|
|||||||
echo "Done"
|
echo "Done"
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v2
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
- name: Login to Repo
|
- name: Login to Repo
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.REPO_USERNAME }}
|
username: ${{ secrets.REPO_USERNAME }}
|
||||||
password: ${{ secrets.REPO_TOKEN }}
|
password: ${{ secrets.REPO_TOKEN }}
|
||||||
@ -54,7 +54,7 @@ jobs:
|
|||||||
key: ${{ runner.os }}-buildx
|
key: ${{ runner.os }}-buildx
|
||||||
|
|
||||||
- name: Build and Push (Latest)
|
- name: Build and Push (Latest)
|
||||||
uses: docker/build-push-action@v4
|
uses: docker/build-push-action@v5
|
||||||
if: steps.branch-name.outputs.current_branch == 'master'
|
if: steps.branch-name.outputs.current_branch == 'master'
|
||||||
with:
|
with:
|
||||||
push: true
|
push: true
|
||||||
@ -64,7 +64,7 @@ jobs:
|
|||||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||||
|
|
||||||
- name: Build and Push (Other Branches)
|
- name: Build and Push (Other Branches)
|
||||||
uses: docker/build-push-action@v4
|
uses: docker/build-push-action@v5
|
||||||
if: steps.branch-name.outputs.current_branch != 'master'
|
if: steps.branch-name.outputs.current_branch != 'master'
|
||||||
with:
|
with:
|
||||||
push: true
|
push: true
|
||||||
|
14
Dockerfile
14
Dockerfile
@ -3,13 +3,13 @@ FROM alpine:3.18.4 as builder
|
|||||||
|
|
||||||
# Install build dependencies and required tools
|
# Install build dependencies and required tools
|
||||||
RUN apk update && apk upgrade && \
|
RUN apk update && apk upgrade && \
|
||||||
apk add --no-cache php81 php81-fpm php81-gd build-base pcre-dev openssl-dev zlib-dev linux-headers
|
apk add --no-cache build-base pcre-dev openssl-dev zlib-dev linux-headers
|
||||||
|
|
||||||
# Download and build the latest version of Nginx from source
|
# Download and build the latest version of Nginx from source
|
||||||
WORKDIR /tmp
|
WORKDIR /tmp
|
||||||
RUN wget https://nginx.org/download/nginx-1.25.2.tar.gz
|
RUN wget https://nginx.org/download/nginx-1.25.3.tar.gz
|
||||||
RUN tar -xzvf nginx-1.25.2.tar.gz
|
RUN tar -xzvf nginx-1.25.3.tar.gz
|
||||||
WORKDIR /tmp/nginx-1.25.2
|
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 ./configure --prefix=/usr/local/nginx --sbin-path=/usr/local/sbin/nginx --conf-path=/etc/nginx/nginx.conf
|
||||||
RUN make
|
RUN make
|
||||||
RUN make install
|
RUN make install
|
||||||
@ -24,19 +24,19 @@ COPY ./docker/nginx.conf /etc/nginx/nginx.conf
|
|||||||
COPY ./upload.php /tmp/upload.php
|
COPY ./upload.php /tmp/upload.php
|
||||||
COPY ./docker/start.sh /start.sh
|
COPY ./docker/start.sh /start.sh
|
||||||
|
|
||||||
# Stage 2: Create a smaller image
|
# Stage 2: Create a smaller production image
|
||||||
FROM alpine:3.18.4
|
FROM alpine:3.18.4
|
||||||
|
|
||||||
# Copy Nginx and PHP-FPM binaries and configurations from the builder stage
|
# Copy Nginx and PHP-FPM binaries and configurations from the builder stage
|
||||||
COPY --from=builder /usr/local/nginx /usr/local/nginx
|
COPY --from=builder /usr/local/nginx /usr/local/nginx
|
||||||
|
COPY --from=builder /usr/local/sbin/nginx /usr/local/sbin/nginx
|
||||||
COPY --from=builder /etc/nginx /etc/nginx
|
COPY --from=builder /etc/nginx /etc/nginx
|
||||||
COPY --from=builder /etc/php81 /etc/php81
|
|
||||||
COPY --from=builder /tmp/upload.php /tmp/upload.php
|
COPY --from=builder /tmp/upload.php /tmp/upload.php
|
||||||
COPY --from=builder /start.sh /start.sh
|
COPY --from=builder /start.sh /start.sh
|
||||||
|
|
||||||
# Install runtime dependencies
|
# Install runtime dependencies
|
||||||
RUN apk update && apk upgrade && \
|
RUN apk update && apk upgrade && \
|
||||||
apk add --no-cache php81 php81-fpm php81-gd
|
apk add --no-cache php81 php81-fpm php81-gd pcre
|
||||||
|
|
||||||
# Cleanup unnecessary files
|
# Cleanup unnecessary files
|
||||||
RUN rm -rf /var/cache/apk/*
|
RUN rm -rf /var/cache/apk/*
|
||||||
|
@ -15,7 +15,7 @@ This PHP script allows you to easily upload ShareX screenshots and videos. It in
|
|||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
1. Copy the `docker-compose.yml` file to your server.
|
1. Copy the `docker-compose.yml` file to your server.
|
||||||
2. Edit the `docker-compose.yml` file and change `MAX_UPLOAD_SIZE` to the maximum file size you want to allow, and update `./uploads` to where you want to store the files.
|
2. Edit the `docker-compose.yml` file and change environment variables to what you need, and update `./uploads` to where you want to store the files.
|
||||||
3. Run `docker-compose up -d` to start the container.
|
3. Run `docker-compose up -d` to start the container.
|
||||||
4. Go to where the files are stored and edit the variables in `upload.php` to your liking.
|
4. Go to where the files are stored and edit the variables in `upload.php` to your liking.
|
||||||
5. Run `docker-compose restart` to restart the container.
|
5. Run `docker-compose restart` to restart the container.
|
||||||
|
6
renovate.json
Normal file
6
renovate.json
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||||
|
"extends": [
|
||||||
|
"local>Fascinated/renovate-config"
|
||||||
|
]
|
||||||
|
}
|
Reference in New Issue
Block a user