Skip to content

Commit

Permalink
change frp domain
Browse files Browse the repository at this point in the history
  • Loading branch information
dsdenes committed Jan 1, 2019
1 parent 73b0d9a commit 72308a8
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
7 changes: 6 additions & 1 deletion bin/wptunnel
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,19 @@ case "$1" in
SUBDOMAIN="$2"
PROJECT_DIR="$HOME/.wptunnel/projects/$2"
sh -c "mkdir -p $PROJECT_DIR"
sh -c "cp -R $HOME/.wptunnel/frp-docker $PROJECT_DIR"

PROJECT_DOCKER_COMPOSE="$PROJECT_DIR/docker-compose.yml"
sh -c "cp ~/.wptunnel/template/docker-compose.yml $PROJECT_DOCKER_COMPOSE"
sh -c "sed -i \"s/{SUBDOMAIN}/${SUBDOMAIN}/g\" $PROJECT_DOCKER_COMPOSE"

PROJECT_FRPC_INI="$PROJECT_DIR/frp-docker/frpc.ini"
sh -c "sed -i \"s/{SUBDOMAIN}/${SUBDOMAIN}/g\" $PROJECT_FRPC_INI"
;;
run)
assert_subdomain "$2"
assert_project "$2"
sh -c "docker-compose --project-directory ~/.wptunnel/projects/$2 start"
sh -c "docker-compose -f ~/.wptunnel/projects/$2/docker-compose.yml up"
;;
eject)
echo "Not yet implemented."
Expand Down
2 changes: 1 addition & 1 deletion docker/frp-docker/frpc.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ server_port = 7000
type = http
local_ip = wordpress
local_port = 80
subdomain = test
subdomain = {SUBDOMAIN}
2 changes: 1 addition & 1 deletion template/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ services:
frp:
depends_on:
- wordpress
build: ../../docker/frp-docker
build: ./frp-docker
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.4
0.0.5

0 comments on commit 72308a8

Please sign in to comment.