mirror of
https://github.com/WJQSERVER-STUDIO/ghproxy.git
synced 2026-02-03 08:11:11 +08:00
24w12c
This commit is contained in:
parent
564364db74
commit
b11a864495
6 changed files with 40 additions and 6 deletions
|
|
@ -1,5 +1,11 @@
|
|||
# 更新日志
|
||||
|
||||
24w12c
|
||||
---
|
||||
- PRE-RELEASE: 此版本是v1.4.1的预发布版本,请勿在生产环境中使用
|
||||
- CHANGE: 优化代码结构,提升性能
|
||||
- CHANGE: 尝试在DEV版本引入Alpine Linux作为基础镜像,减少镜像体积
|
||||
|
||||
24w12b
|
||||
---
|
||||
- PRE-RELEASE: 此版本是v1.4.1的预发布版本,请勿在生产环境中使用
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
FROM wjqserver/caddy:daily
|
||||
FROM wjqserver/caddy:daily-alpine
|
||||
|
||||
ARG USER=WJQSERVER-STUDIO
|
||||
ARG REPO=ghproxy
|
||||
|
|
@ -11,11 +11,11 @@ RUN wget -O /data/www/index.html https://raw.githubusercontent.com/${USER}/${REP
|
|||
RUN wget -O /data/www/favicon.ico https://raw.githubusercontent.com/${USER}/${REPO}/main/pages/favicon.ico
|
||||
RUN wget -O /data/caddy/Caddyfile https://raw.githubusercontent.com/${USER}/${REPO}/main/caddyfile/release/Caddyfile
|
||||
RUN VERSION=$(curl -s https://raw.githubusercontent.com/${USER}/${REPO}/main/DEV-VERSION) && \
|
||||
wget -O /data/${APPLICATION}/${APPLICATION} https://github.com/${USER}/${REPO}/releases/download/$VERSION/${APPLICATION}
|
||||
wget -O /data/${APPLICATION}/${APPLICATION} https://github.com/${USER}/${REPO}/releases/download/$VERSION/ghproxy
|
||||
RUN wget -O /data/${APPLICATION}/config.yaml https://raw.githubusercontent.com/${USER}/${REPO}/main/config/config.yaml
|
||||
RUN wget -O /data/${APPLICATION}/blacklist.json https://raw.githubusercontent.com/${USER}/${REPO}/main/config/blacklist.json
|
||||
RUN wget -O /data/${APPLICATION}/whitelist.json https://raw.githubusercontent.com/${USER}/${REPO}/main/config/whitelist.json
|
||||
RUN wget -O /usr/local/bin/init.sh https://raw.githubusercontent.com/${USER}/${REPO}/main/init.sh
|
||||
RUN wget -O /usr/local/bin/init.sh https://raw.githubusercontent.com/${USER}/${REPO}/main/docker/dockerfile/alpine/init.sh
|
||||
RUN chmod +x /data/${APPLICATION}/${APPLICATION}
|
||||
RUN chmod +x /usr/local/bin/init.sh
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
FROM wjqserver/caddy:daily-alpine
|
||||
FROM wjqserver/caddy:daily
|
||||
|
||||
ARG USER=WJQSERVER-STUDIO
|
||||
ARG REPO=ghproxy
|
||||
|
|
@ -11,11 +11,11 @@ RUN wget -O /data/www/index.html https://raw.githubusercontent.com/${USER}/${REP
|
|||
RUN wget -O /data/www/favicon.ico https://raw.githubusercontent.com/${USER}/${REPO}/main/pages/favicon.ico
|
||||
RUN wget -O /data/caddy/Caddyfile https://raw.githubusercontent.com/${USER}/${REPO}/main/caddyfile/release/Caddyfile
|
||||
RUN VERSION=$(curl -s https://raw.githubusercontent.com/${USER}/${REPO}/main/DEV-VERSION) && \
|
||||
wget -O /data/${APPLICATION}/${APPLICATION} https://github.com/${USER}/${REPO}/releases/download/$VERSION/ghproxy-alpine
|
||||
wget -O /data/${APPLICATION}/${APPLICATION} https://github.com/${USER}/${REPO}/releases/download/$VERSION/${APPLICATION}
|
||||
RUN wget -O /data/${APPLICATION}/config.yaml https://raw.githubusercontent.com/${USER}/${REPO}/main/config/config.yaml
|
||||
RUN wget -O /data/${APPLICATION}/blacklist.json https://raw.githubusercontent.com/${USER}/${REPO}/main/config/blacklist.json
|
||||
RUN wget -O /data/${APPLICATION}/whitelist.json https://raw.githubusercontent.com/${USER}/${REPO}/main/config/whitelist.json
|
||||
RUN wget -O /usr/local/bin/init.sh https://raw.githubusercontent.com/${USER}/${REPO}/main/docker/dockerfile/alpine/init.sh
|
||||
RUN wget -O /usr/local/bin/init.sh https://raw.githubusercontent.com/${USER}/${REPO}/main/init.sh
|
||||
RUN chmod +x /data/${APPLICATION}/${APPLICATION}
|
||||
RUN chmod +x /usr/local/bin/init.sh
|
||||
|
||||
28
docker/dockerfile/release/init.sh
Normal file
28
docker/dockerfile/release/init.sh
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
#!/bin/bash
|
||||
|
||||
APPLICATON=ghproxy
|
||||
|
||||
if [ ! -f /data/caddy/config/Caddyfile ]; then
|
||||
cp /data/caddy/Caddyfile /data/caddy/config/Caddyfile
|
||||
fi
|
||||
|
||||
if [ ! -f /data/${APPLICATON}/config/blacklist.json ]; then
|
||||
cp /data/${APPLICATON}/blacklist.json /data/${APPLICATON}/config/blacklist.json
|
||||
fi
|
||||
|
||||
if [ ! -f /data/${APPLICATON}/config/whitelist.json ]; then
|
||||
cp /data/${APPLICATON}/whitelist.json /data/${APPLICATON}/config/whitelist.json
|
||||
fi
|
||||
|
||||
if [ ! -f /data/${APPLICATON}/config/config.yaml ]; then
|
||||
cp /data/${APPLICATON}/config.yaml /data/${APPLICATON}/config/config.yaml
|
||||
fi
|
||||
|
||||
/data/caddy/caddy run --config /data/caddy/config/Caddyfile > /data/${APPLICATON}/log/caddy.log 2>&1 &
|
||||
|
||||
/data/${APPLICATON}/${APPLICATON} > /data/ghproxy/log/run.log 2>&1 &
|
||||
|
||||
while [[ true ]]; do
|
||||
sleep 1
|
||||
done
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue