-
Notifications
You must be signed in to change notification settings - Fork 8
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
11 changed files
with
244 additions
and
75 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,5 @@ | ||
.github/ | ||
.gitignore | ||
*.service | ||
*.md | ||
LICENSE |
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,45 @@ | ||
name: deploy | ||
|
||
on: | ||
push: | ||
branches: | ||
- '*' | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
docker_hub: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Clone repository | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
fetch-depth: 2 | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: ${{ secrets.DOCKERHUB_USERNAME }}/frp_info | ||
tags: | | ||
type=raw,value=latest,enable={{is_default_branch}} | ||
type=ref,event=branch | ||
type=ref,event=tag | ||
type=ref,event=pr | ||
- name: Build and push Docker image | ||
id: docker_build | ||
uses: docker/build-push-action@v3 | ||
with: | ||
platforms: linux/amd64 | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
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,35 @@ | ||
name: deploy with uwsgi | ||
|
||
on: | ||
push: | ||
branches: | ||
- '*' | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
docker_hub: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Clone repository | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
fetch-depth: 2 | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Build and push Docker image | ||
id: docker_build | ||
uses: docker/build-push-action@v3 | ||
with: | ||
file: ./uwsgi.Dockerfile | ||
platforms: linux/amd64 | ||
push: true | ||
tags: ${{ secrets.DOCKERHUB_USERNAME }}/frp_info:uwsgi |
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 |
---|---|---|
@@ -1,19 +1,15 @@ | ||
FROM alpine:latest | ||
MAINTAINER github user: zfxkj and zfb132 | ||
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories | ||
RUN apk update | ||
RUN apk add python3 python3-dev py3-pip | ||
LABEL github user: zfb132 | ||
|
||
COPY . /frp | ||
|
||
WORKDIR /frp | ||
RUN set -e; \ | ||
apk add --no-cache --virtual .build-deps \ | ||
gcc \ | ||
libc-dev \ | ||
linux-headers \ | ||
; \ | ||
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --upgrade pip; \ | ||
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt; \ | ||
apk del .build-deps gcc libc-dev linux-headers; | ||
RuN sed -i 's/home = ./#home = ./g' /frp/uwsgi_frp-info.ini | ||
|
||
ENTRYPOINT [ "uwsgi", "--ini", "uwsgi_frp-info.ini" ] | ||
RUN apk add --update --no-cache py-pip; \ | ||
sed -i '/^uwsgi/d' requirements.txt; \ | ||
sed -i 's/6665/6666/g' runserver.py; \ | ||
pip install --no-cache-dir -r requirements.txt; | ||
|
||
EXPOSE 6666 | ||
|
||
ENTRYPOINT ["python3", "runserver.py"] |
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
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 |
---|---|---|
@@ -1,2 +1 @@ | ||
202.114.12.11 | ||
192.168.0.0/28 |
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
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
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
Oops, something went wrong.