Skip to content

Commit

Permalink
fix: ci fail
Browse files Browse the repository at this point in the history
  • Loading branch information
ICKelin committed Oct 13, 2023
1 parent d5d965f commit 2b4a0ba
Show file tree
Hide file tree
Showing 7 changed files with 113 additions and 0 deletions.
File renamed without changes.
14 changes: 14 additions & 0 deletions build_image.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
WORKSPACE=`pwd`
./build_exec.sh

echo "building gtund docker image"
cd docker-build/gtund
cp $WORKSPACE/bin/gtund/gtund .
docker build . -t gtund
echo "builded gtund docker image"

echo "building gtun docker image"
cd $WORKSPACE/docker-build/gtun
cp $WORKSPACE/bin/gtun/gtun-linux_amd64 .
docker build . -t gtun
echo "builded gtun docker image"
65 changes: 65 additions & 0 deletions docker-build/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
version: '3'
services:
gtun:
build: ./gtun
container_name: gtun
restart: always
network_mode: host
privileged: true
volumes:
- /opt/apps/logs:/opt/logs
environment:
TIME_ZONE: Asia/Shanghai
settings: |
settings:
CN:
proxy_file: "https://www.ipdeny.com/ipblocks/data/countries/us.zone"
route:
- trace_addr: ${CN_SERVER_IP}:${CN_SERVER_TRACE_PORT}
scheme: "kcp"
addr: ${CN_SERVER_IP}:${CN_SERVER_PORT}
auth_key: ""
proxy:
"tproxy_tcp": |
{
"read_timeout": 30,
"write_timeout": 30,
"listen_addr": ":8524",
"rate_limit": 50,
"region": "CN"
}
"tproxy_udp": |
{
"read_timeout": 30,
"write_timeout": 30,
"session_timeout": 30,
"listen_addr": ":8524",
"rate_limit": 50,
"region": "CN"
}
log:
days: 5
level: Debug
path: gtun.log
http_server:
listen_addr: ":9001"
gtund:
build: ./gtund
container_name: gtund
restart: always
network_mode: host
volumes:
- /opt/apps/logs:/logs
environment:
TIME_ZONE: Asia/Shanghai
settings: |
server:
- listen: ":3002"
authKey: "rewrite with your auth key"
scheme: "kcp"
trace: ":3003"
log:
days: 5
level: "debug"
path: "gtund.log"
6 changes: 6 additions & 0 deletions docker-build/gtun/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM ubuntu:18.04
COPY gtun-linux_amd64 /gtun
COPY start.sh /
RUN chmod +x start.sh && chmod +x gtun
RUN mkdir /opt/logs
CMD /start.sh
11 changes: 11 additions & 0 deletions docker-build/gtun/start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash
if [ "$TIME_ZONE" != "" ]; then
ln -snf /usr/share/zoneinfo/$TIME_ZONE /etc/localtime && echo $TIME_ZONE > /etc/timezone
fi

#项目的配置文件
if [ "$settings" != "" ]; then
echo "$settings" > /gtun.yaml
fi

/gtun -c /gtun.yaml
6 changes: 6 additions & 0 deletions docker-build/gtund/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM ubuntu:18.04
COPY gtund /
COPY start.sh /
RUN chmod +x start.sh && chmod +x gtund
RUN mkdir /opt/logs
CMD /start.sh
11 changes: 11 additions & 0 deletions docker-build/gtund/start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash
if [ "$TIME_ZONE" != "" ]; then
ln -snf /usr/share/zoneinfo/$TIME_ZONE /etc/localtime && echo $TIME_ZONE > /etc/timezone
fi

#项目的配置文件
if [ "$settings" != "" ]; then
echo "$settings" > /gtund.yaml
fi

/gtund -c /gtund.yaml

0 comments on commit 2b4a0ba

Please sign in to comment.