-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
127 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: Build image | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- | ||
name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: ${{ secrets.DOCKER_USERNAME }}/wxchat | ||
tags: | | ||
type=raw,value=latest | ||
- | ||
name: Set Up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- | ||
name: Set Up Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- | ||
name: Login DockerHub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- | ||
name: Build | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
file: Dockerfile | ||
platforms: | | ||
linux/386 | ||
linux/amd64 | ||
linux/arm64/v8 | ||
linux/arm/v7 | ||
linux/arm/v6 | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
cache-from: type=gha, scope=${{ github.workflow }} | ||
cache-to: type=gha, scope=${{ github.workflow }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
FROM alpine:3.18 | ||
|
||
ENV TZ=Asia/Shanghai | ||
|
||
RUN apk add --no-cache tzdata bash nginx && \ | ||
rm -rf /var/cache/apk/* /tmp/* | ||
|
||
COPY --chmod=755 ./rootfs / | ||
|
||
EXPOSE 80 | ||
|
||
ENTRYPOINT ["nginx"] | ||
CMD ["-g" "daemon off;"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<html> | ||
|
||
<head> | ||
<meta charset="utf-8"> | ||
<title>微信代理</title> | ||
</head> | ||
|
||
<body> | ||
<h1>微信代理搭建成功,请访问Docker对应端口</h1> | ||
|
||
|
||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
server { | ||
listen 80; | ||
listen [::]:80; | ||
|
||
location / { | ||
root /app/web; | ||
index index.html index.htm; | ||
} | ||
location /cgi-bin/gettoken { | ||
proxy_pass https://qyapi.weixin.qq.com; | ||
} | ||
location /cgi-bin/message/send { | ||
proxy_pass https://qyapi.weixin.qq.com; | ||
} | ||
location /cgi-bin/menu/create { | ||
proxy_pass https://qyapi.weixin.qq.com; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
user root; | ||
worker_processes 1; | ||
|
||
error_log /var/log/nginx/error.log; | ||
|
||
events { | ||
worker_connections 1024; | ||
} | ||
|
||
http { | ||
server_tokens off; | ||
include mime.types; | ||
default_type application/octet-stream; | ||
log_format main '$remote_addr - $remote_user [$time_local] ' | ||
'"$request" $status $body_bytes_sent ' | ||
'"$http_referer" "$http_user_agent" "$http_x_forwarded_for" $request_id $msec $request_time ' | ||
'$upstream_connect_time $upstream_header_time $upstream_response_time'; | ||
access_log /var/log/nginx/access.log main; | ||
sendfile on; | ||
keepalive_timeout 65; | ||
gzip on; | ||
client_max_body_size 512m; | ||
include /etc/nginx/conf.d/*.conf; | ||
} |