-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME
More file actions
51 lines (32 loc) · 1.04 KB
/
README
File metadata and controls
51 lines (32 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
Working on localhost
Starting the Python Thrift Server
cd python-server-thrift/
source bin/activate
python PythonServer.py
Starting the Java Thrift Client, that is at the same time a REST Server.
cd java-client-thrift/
mvn clean install
mvn spring-boot:run
Testing it.
curl http://localhost:8080/hello
Java REST server is listening on port 8080, starts a thrift client and connects to the thirft server at port 9090.
Working with Docker-Compose
First Compiling the Java Client
cd java-client-thrift/
mvn clean install
Then using the docker-compose commands.
cd ../
docker-compose up -d
docker-compose ps
docker-compose logs -f
If you want to stop them
docker-compose down
And if you want to delete them completely
docker-compose down --rmi all --volumes
Working with Maven Docker Plugin
cd python-thrift-server/
docker run -p 9090:9090 --name python-thrift-server -d python-thrift-server:latest
cd ../
cd java-client-thrift/
mvn docker:build
docker run -d -p 8080:8080 --name java-test-client -e PYTHON_THRIFT_PORT=9090 java-test-client:latest