feat: update

This commit is contained in:
liuyx 2025-03-21 19:47:54 +08:00
parent 753f4b40cb
commit 9a45796f5f
3 changed files with 66 additions and 0 deletions

1
.gitignore vendored
View File

@ -25,3 +25,4 @@
go.work
# End of https://www.toptal.com/developers/gitignore/api/go
data/

30
Makefile Normal file
View File

@ -0,0 +1,30 @@
# 初始化 Git 仓库
.PHONY: git-init conf-init
git-init:
@if [ ! -d .git ]; then \
echo "Initializing git repository..."; \
git init; \
git add .; \
git commit -m "Initial commit"; \
else \
echo "Git repository already initialized."; \
fi
conf-init:
@echo "Copying configuration files..."
-@mkdir data
@cp -r ./src/conf data/
.PHONY: run-cli run-server run-all
run-cli:
@echo "Starting client services..."
@docker compose --profile client up -d --force-recreate --build
run-server:
@echo "Starting server services..."
@docker compose --profile server up -d --force-recreate --build
run-all:
@echo "Starting all services..."
@docker compose --profile server --profile client up -d --force-recreate --build

35
docker-compose.yaml Normal file
View File

@ -0,0 +1,35 @@
services:
frp-server:
container_name: frps
image: gofrps:dev
build:
context: ./src
dockerfile: dockerfiles/Dockerfile-for-frps
command: ["-c", "/app/frps.ini"]
profiles:
- server
volumes:
- ./data:/app
- /etc/timezone:/etc/timezone:ro
ports:
- "7000:7000" # Adjust as needed
- "7500:7500" # Adjust as needed
frp-client:
container_name: frpc
image: gofrpc:dev
build:
context: ./src
dockerfile: dockerfiles/Dockerfile-for-frpc
command: ["-c", "/app/frpc.ini"]
profiles:
- client
volumes:
- ./data:/app
- /etc/timezone:/etc/timezone:ro
networks:
default:
driver: bridge
name: local
external: true