Skip to content

A self-hosted media server and file management system

build workflow

aminnausin4b14d605ef9f
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index f583873e..aa422f26 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -1,30 +1,28 @@
name: Docker Image CI
on:
- workflow_dispatch:
- inputs:
- release:
- description: "yes to release"
- required: false
+ workflow_dispatch:
+ inputs:
+ release:
+ description: 'yes to release'
+ required: false
jobs:
+ build:
+ runs-on: ubuntu-latest
- build:
+ steps:
+ - name: 读取仓库的内容
+ uses: actions/checkout@v4
- runs-on: ubuntu-latest
+ - name: 登陆Docker Hub
+ uses: docker/login-action@v3
+ with:
+ username: ${{ secrets.DOCKER_HUB_USERNAME }}
+ password: ${{ secrets.DOCKER_HUB_TOKEN }}
- steps:
- - name: 读取仓库的内容
- uses: actions/checkout@v4
-
- - name: 登陆Docker Hub
- uses: docker/login-action@v3
- with:
- username: ${{ secrets.DOCKER_HUB_USERNAME }}
- password: ${{ secrets.DOCKER_HUB_TOKEN }}
-
- - name: 构建并推送到Docker Hub
- uses: docker/build-push-action@v5
- with:
- push: true
- tags: suyiyi/mediaserver:latest
+ - name: 构建并推送到Docker Hub
+ uses: docker/build-push-action@v5
+ with:
+ push: true
+ tags: aminnausin/mediaserver:latest
diff --git a/Dockerfile b/Dockerfile
index 31535c04..28a3cb27 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -33,59 +33,4 @@ RUN php artisan storage:link
COPY --from=builder /var/www/html/public/build ./public/build
-# Set permissions for the entrypoint script
-
-# RUN cp .env.example .env
-
-# RUN php artisan key:generate
-
-# RUN php artisan reverb:generate
-
-# RUN php artisan storage:link
-
-# RUN php artisan migrate
-
ENV DOCUMENT_ROOT=/var/www/html/public
-# # syntax=docker/dockerfile:1
-
-# FROM php:8.4-fpm
-
-# RUN apt-get update && apt-get install -y \
-# build-essential \
-# libpng-dev \
-# libjpeg-dev \
-# libwebp-dev \
-# libxpm-dev \
-# libfreetype6-dev \
-# libzip-dev \
-# zip \
-# unzip \
-# git \
-# bash \
-# fcgiwrap \
-# libmcrypt-dev \
-# libonig-dev \
-# libpq-dev \
-# ffmpeg \
-# exiftool \
-# && rm -rf /var/lib/apt/lists/*
-
-# # Install PHP extensions
-# RUN docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp \
-# && docker-php-ext-install gd \
-# && docker-php-ext-install pdo pdo_pgsql mbstring zip exif pcntl bcmath opcache
-
-# # Install Composer
-# COPY --from=composer/composer:latest-bin /composer /usr/bin/composer
-
-# # Copy existing application directory contents
-# COPY . /var/www/html/
-
-# # Set ownership and permissions for the /var/www/html directory to www-data
-# RUN chown -R www-data:www-data /var/www/html/
-
-# USER www-data
-
-# EXPOSE 9000
-
-# CMD ["php-fpm"]
diff --git a/docker/caddy/CaddyFile b/docker/caddy/CaddyFile
index aef25ae7..6433ab55 100644
--- a/docker/caddy/CaddyFile
+++ b/docker/caddy/CaddyFile
@@ -1,33 +1,21 @@
http://app.test:8080 {
- root * /var/www/html/public
- encode gzip
+ root * /var/www/html/public
+ encode gzip
- php_fastcgi app:9000 {
- root /var/www/html/public
- split .php
- index index.php
- try_files {path} {path}/ /index.php?{query}&{query}
- }
+ php_fastcgi app:9000
- file_server
+ file_server
- handle_errors {
- @404 {
- method GET
- not file
- path not *
- }
- rewrite @404 /index.php
- }
+ handle_errors {
+ @404 {
+ method GET
+ not file
+ path not *
+ }
+ rewrite @404 /index.php
+ }
- handle_errors {
- rewrite * /index.php
- }
-
- log {
- output file /var/log/caddy.log
- level debug
- }
-
- reverse_proxy /app
+ handle_errors {
+ rewrite * /index.php
+ }
}