Skip to content

Commit

Permalink
feat : test server add
Browse files Browse the repository at this point in the history
  • Loading branch information
seipan committed Sep 29, 2023
1 parent 10f30e3 commit f82a1b3
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 1 deletion.
22 changes: 21 additions & 1 deletion testserver/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
DOCKER_FILE_DIR := ./docker
DOCKER_COMPOSE_LOCAL_SERVER := $(DOCKER_FILE_DIR)/docker-compose.yml

.PHONY: tidy
tidy:
./script/gomod.sh
./script/gomod.sh


.PHONY: up
up:
docker-compose \
-f $(DOCKER_COMPOSE_LOCAL_SERVER) up -d


.PHONY: down
down:
docker-compose \
-f $(DOCKER_COMPOSE_LOCAL_SERVER) down \
--rmi all --volumes --remove-orphans


.PHONY: re
re:down up
37 changes: 37 additions & 0 deletions testserver/docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
version: '3'
services:
serverone:
build:
context: ../localhost/8081
dockerfile: Dockerfile
ports:
- 8081:8081
volumes:
- ../../:/go/src/github.com/seipan/mylb/testserver/localhost/8081

servertwo:
build:
context: ../localhost/8082
dockerfile: Dockerfile
ports:
- 8082:8082
volumes:
- ../../:/go/src/github.com/seipan/mylb/testserver/localhost/8082

serverthree:
build:
context: ../localhost/8083
dockerfile: Dockerfile
ports:
- 8083:8083
volumes:
- ../../:/go/src/github.com/seipan/mylb/testserver/localhost/8083

serverfour:
build:
context: ../localhost/8084
dockerfile: Dockerfile
ports:
- 8084:8084
volumes:
- ../../:/go/src/github.com/seipan/mylb/testserver/localhost/8083

0 comments on commit f82a1b3

Please sign in to comment.