Skip to content

Commit aba7748

Browse files
Update readme (elemental-source#23)
1 parent 49878ba commit aba7748

File tree

3 files changed

+27
-7
lines changed

3 files changed

+27
-7
lines changed

README.md

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,22 +87,22 @@ Now, in order to properly use the data file, we should consider where it should
8787
### Using Your Property File
8888
Create a valid property file in `src/main/resources/application-custom.yml` then run with `-Dspring.profiles.active=custom` argument. Example:
8989

90-
```
91-
gradle bootRun -Dspring.profiles.active=custom
90+
```shell
91+
./gradlew bootRun -Dspring.profiles.active=custom
9292
```
9393

9494
### Using Docker Image
9595
To generate the Docker image, run:
9696

97-
```
98-
gradle buildDocker
97+
```shell
98+
./gradlew buildDocker
9999
```
100100

101101
By default, the image name will be `elemental-source/mock-api:VERSION`.
102102

103103
In order to run the application, create two folders: one containing the `application-custom.yml` configuration file and the other containing the mock data files. Then run:
104104

105-
```
105+
```shell
106106
docker run -d --name mock-api \
107107
-p 9090:9090 \
108108
-p 5000:5000 \
@@ -115,6 +115,24 @@ Port `9090` exposes the service while port `5000` can be used to debug the appli
115115

116116
You can check application logs from the container: `docker logs -f mock-api`
117117

118+
Example:
119+
120+
```shell
121+
docker run --rm --name mock-api \
122+
-p 9090:9090 \
123+
-p 5000:5000 \
124+
-v $(pwd)/src/test/resources:/config \
125+
-v $(pwd)/src/test/mocks-test:/data \
126+
elemental-source/mock-api:4.0.0-SNAPSHOT
127+
```
128+
129+
And then get results: `curl -X GET 'http://localhost:9090/guests/132'`
130+
131+
You can configure your program arguments in your IDE:
132+
```
133+
--spring.config.location=file/name/example/application.yml
134+
```
135+
118136
## TODO
119137

120138
- [X] Fix code Style

src/main/resources/application.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,5 @@ file:
4747
# Initialize app in capture mode. All requests will be saved
4848
captureState: true
4949

50-
debug: true
50+
#debug: true
51+
logging.level.ROOT: INFO

src/test/resources/application.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,5 @@ file:
3737

3838
captureState: false
3939

40-
debug: true
40+
#debug: true
41+
logging.level.ROOT: INFO

0 commit comments

Comments
 (0)