mirror of
https://github.com/ChristianLempa/boilerplates.git
synced 2024-11-25 01:34:36 +01:00
Add fast reverse proxy docker compose
From https://github.com/fatedier/frp
This commit is contained in:
parent
fee2afa268
commit
dfc244435d
3
docker-compose/frpc/.env.example
Normal file
3
docker-compose/frpc/.env.example
Normal file
@ -0,0 +1,3 @@
|
||||
# rename the file to .env
|
||||
FRP_AUTH_TOKEN=your_auth_token
|
||||
FRP_DASHBOARD_PASSWORD=your_dashboard_password
|
1
docker-compose/frpc/.gitignore
vendored
Normal file
1
docker-compose/frpc/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.env
|
14
docker-compose/frpc/Dockerfile
Normal file
14
docker-compose/frpc/Dockerfile
Normal file
@ -0,0 +1,14 @@
|
||||
FROM alpine:latest
|
||||
|
||||
RUN apk add --no-cache wget tar
|
||||
|
||||
ENV FRP_VERSION 0.59.0
|
||||
|
||||
RUN wget https://github.com/fatedier/frp/releases/download/v${FRP_VERSION}/frp_${FRP_VERSION}_linux_amd64.tar.gz \
|
||||
&& tar -xzf frp_${FRP_VERSION}_linux_amd64.tar.gz \
|
||||
&& mv frp_${FRP_VERSION}_linux_amd64 /frp \
|
||||
&& rm frp_${FRP_VERSION}_linux_amd64.tar.gz
|
||||
|
||||
EXPOSE 7400
|
||||
|
||||
ENTRYPOINT ["/frp/frpc", "-c", "/frp/frpc.toml"]
|
13
docker-compose/frpc/compose.yaml
Normal file
13
docker-compose/frpc/compose.yaml
Normal file
@ -0,0 +1,13 @@
|
||||
---
|
||||
services:
|
||||
frpc:
|
||||
build: .
|
||||
container_name: frpc
|
||||
ports:
|
||||
- 7400:7400
|
||||
environment:
|
||||
FRP_AUTH_TOKEN: ${FRP_AUTH_TOKEN}
|
||||
FRP_DASHBOARD_PASSWORD: ${FRP_DASHBOARD_PASSWORD}
|
||||
volumes:
|
||||
- ./frpc.toml:/frp/frpc.toml
|
||||
restart: unless-stopped
|
21
docker-compose/frpc/frpc.toml
Normal file
21
docker-compose/frpc/frpc.toml
Normal file
@ -0,0 +1,21 @@
|
||||
serverAddr = "your-frps-server.com"
|
||||
serverPort = 7000
|
||||
|
||||
auth.method = "token"
|
||||
auth.token = "{{ .Envs.FRP_AUTH_TOKEN }}"
|
||||
|
||||
webServer.addr = "0.0.0.0"
|
||||
webServer.port = 7400
|
||||
|
||||
webServer.user = "admin"
|
||||
webServer.password = "{{ .Envs.FRP_DASHBOARD_PASSWORD }}"
|
||||
|
||||
|
||||
# Now your (local!) portainer will be avaliable at your-frps-server.com:9000
|
||||
# (assuming you run frps on your server of course)
|
||||
[[proxies]]
|
||||
name = "portainer"
|
||||
type = "tcp"
|
||||
localIP = "host.docker.internal"
|
||||
localPort = 9000
|
||||
remotePort = 9000
|
3
docker-compose/frps/.env.example
Normal file
3
docker-compose/frps/.env.example
Normal file
@ -0,0 +1,3 @@
|
||||
# rename the file to .env
|
||||
FRP_AUTH_TOKEN=your_auth_token
|
||||
FRP_DASHBOARD_PASSWORD=your_dashboard_password
|
1
docker-compose/frps/.gitignore
vendored
Normal file
1
docker-compose/frps/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.env
|
14
docker-compose/frps/Dockerfile
Normal file
14
docker-compose/frps/Dockerfile
Normal file
@ -0,0 +1,14 @@
|
||||
FROM alpine:latest
|
||||
|
||||
RUN apk add --no-cache wget tar
|
||||
|
||||
ENV FRP_VERSION 0.59.0
|
||||
|
||||
RUN wget https://github.com/fatedier/frp/releases/download/v${FRP_VERSION}/frp_${FRP_VERSION}_linux_amd64.tar.gz \
|
||||
&& tar -xzf frp_${FRP_VERSION}_linux_amd64.tar.gz \
|
||||
&& mv frp_${FRP_VERSION}_linux_amd64 /frp \
|
||||
&& rm frp_${FRP_VERSION}_linux_amd64.tar.gz
|
||||
|
||||
EXPOSE 7000 7500
|
||||
|
||||
ENTRYPOINT ["/frp/frps", "-c", "/frp/frps.toml"]
|
12
docker-compose/frps/compose.yaml
Normal file
12
docker-compose/frps/compose.yaml
Normal file
@ -0,0 +1,12 @@
|
||||
---
|
||||
services:
|
||||
frps:
|
||||
build: .
|
||||
container_name: frps
|
||||
network_mode: host
|
||||
environment:
|
||||
FRP_AUTH_TOKEN: ${FRP_AUTH_TOKEN}
|
||||
FRP_DASHBOARD_PASSWORD: ${FRP_DASHBOARD_PASSWORD}
|
||||
volumes:
|
||||
- ./frps.toml:/frp/frps.toml
|
||||
restart: unless-stopped
|
10
docker-compose/frps/frps.toml
Normal file
10
docker-compose/frps/frps.toml
Normal file
@ -0,0 +1,10 @@
|
||||
bindPort = 7000
|
||||
|
||||
auth.method = "token"
|
||||
auth.token = "{{ .Envs.FRP_AUTH_TOKEN }}"
|
||||
|
||||
webServer.addr = "0.0.0.0"
|
||||
webServer.port = 7500
|
||||
|
||||
webServer.user = "admin"
|
||||
webServer.password = "{{ .Envs.FRP_DASHBOARD_PASSWORD }}"
|
Loading…
Reference in New Issue
Block a user