精简提交历史记录
This commit is contained in:
3
apps/picx/latest/.env.sample
Normal file
3
apps/picx/latest/.env.sample
Normal file
@@ -0,0 +1,3 @@
|
||||
CONTAINER_NAME="picx"
|
||||
PANEL_APP_PORT_HTTP="40131"
|
||||
DATA_PATH="./data"
|
||||
26
apps/picx/latest/Dockerfile
Normal file
26
apps/picx/latest/Dockerfile
Normal file
@@ -0,0 +1,26 @@
|
||||
# 使用基于NGINX的稳定版本的Alpine Linux镜像作为基础镜像
|
||||
FROM nginx:stable-alpine-slim
|
||||
|
||||
# 设置工作目录为/app
|
||||
WORKDIR /app
|
||||
|
||||
# 更新包信息并安装git和coreutils软件包
|
||||
RUN apk update && \
|
||||
apk add --no-cache git coreutils
|
||||
|
||||
# 克隆名为"picx"的GitHub仓库的"gh-pages"分支
|
||||
RUN git clone -b gh-pages https://github.com/XPoet/picx
|
||||
|
||||
# 将entrypoint.sh脚本文件复制到工作目录/app/
|
||||
COPY entrypoint.sh /app/
|
||||
# 赋予entrypoint.sh脚本文件可执行权限
|
||||
RUN chmod +x /app/entrypoint.sh
|
||||
|
||||
# 指定要公开的端口
|
||||
EXPOSE 80
|
||||
|
||||
# 切换工作目录至NGINX的默认网页目录
|
||||
WORKDIR /usr/share/nginx/
|
||||
|
||||
# 定义容器启动时的默认命令,执行/app/entrypoint.sh脚本
|
||||
CMD ["sh", "-c", "/app/entrypoint.sh"]
|
||||
17
apps/picx/latest/data.yml
Normal file
17
apps/picx/latest/data.yml
Normal file
@@ -0,0 +1,17 @@
|
||||
additionalProperties:
|
||||
formFields:
|
||||
- default: 40131
|
||||
edit: true
|
||||
envKey: PANEL_APP_PORT_HTTP
|
||||
labelEn: Port
|
||||
labelZh: 端口
|
||||
required: true
|
||||
rule: paramPort
|
||||
type: number
|
||||
- default: ./data
|
||||
edit: true
|
||||
envKey: DATA_PATH
|
||||
labelEn: Data folder path
|
||||
labelZh: 数据文件夹路径
|
||||
required: true
|
||||
type: text
|
||||
21
apps/picx/latest/docker-compose.yml
Normal file
21
apps/picx/latest/docker-compose.yml
Normal file
@@ -0,0 +1,21 @@
|
||||
version: '3'
|
||||
services:
|
||||
picx:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
image: picx:latest
|
||||
container_name: ${CONTAINER_NAME}
|
||||
restart: always
|
||||
networks:
|
||||
- 1panel-network
|
||||
ports:
|
||||
- "${PANEL_APP_PORT_HTTP}:80"
|
||||
volumes:
|
||||
- ${DATA_PATH}:/usr/share/nginx/html
|
||||
labels:
|
||||
createdBy: "Apps"
|
||||
|
||||
networks:
|
||||
1panel-network:
|
||||
external: true
|
||||
16
apps/picx/latest/entrypoint.sh
Normal file
16
apps/picx/latest/entrypoint.sh
Normal file
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
|
||||
# 递归地将/app/picx/目录下的内容复制到nginx网页目录
|
||||
cp -r /app/picx/* /usr/share/nginx/html/
|
||||
|
||||
# 设置nginx网页目录的所有者和组为nginx,确保nginx服务器能够访问这些文件
|
||||
chown -R nginx:nginx /usr/share/nginx/html
|
||||
|
||||
# 使用find命令递归地设置网页文件夹的权限为755,确保可读和可执行,但不可写
|
||||
find /usr/share/nginx/html -type d -exec chmod 755 {} \;
|
||||
|
||||
# 使用find命令递归地设置网页文件的权限为644,确保所有者可读写,其他用户只可读
|
||||
find /usr/share/nginx/html -type f -exec chmod 644 {} \;
|
||||
|
||||
# 启动nginx服务器,以前台方式运行
|
||||
nginx -g 'daemon off;'
|
||||
Reference in New Issue
Block a user