Skip to content

Commit c8ef440

Browse files
committed
Fix markdown inconsistencies
1 parent 6ef8cd9 commit c8ef440

File tree

1 file changed

+34
-35
lines changed

1 file changed

+34
-35
lines changed

README.md

Lines changed: 34 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Project configuration is managed through the use of YAML configuration (see reso
99
### _Requirements_
1010
This section covers the mandatory pre-requisites needed to be able to run the application.
1111

12-
* Windows, Linux, AWS, GCP or MacOS
12+
* Windows, Linux, AWS, GCP or macOS
1313
* JDK 8+
1414
* Maven
1515
* Git
@@ -19,7 +19,7 @@ This section covers the mandatory pre-requisites needed to be able to run the ap
1919
### _Quick Install_
2020
This section describes how to download, install and run the application.
2121

22-
###### A. Using Maven on MacOS (recommended installation method)
22+
###### A. Using Maven on macOS (recommended installation method)
2323

2424
(1). Clone the repo:
2525

@@ -33,7 +33,8 @@ If you have installed [Redis](https://redis.io/docs/install/install-redis/) or [
3333
sudo systemctl start redis
3434
sudo systemctl start aerospike
3535
```
36-
Alternatively, you may start DB as Docker image. But before you should install [Docker Engine](https://docs.docker.com/engine/install/), if you don't have one.
36+
Alternatively, you may start DB as Docker image.
37+
You should install [Docker Engine](https://docs.docker.com/engine/install/) if you don't have one.
3738

3839
(2.1) Redis via Docker
3940
1. Pull [Redis docker image](https://hub.docker.com/_/redis) of an appropriate version
@@ -46,7 +47,7 @@ docker pull redis:<version>
4647
```bash
4748
docker run -d --name redis -p <host_port>:<container_port> redis:<version>
4849

49-
// Example (the host will be defined as localhost by default)
50+
# Example (the host will be defined as localhost by default)
5051
docker run -d --name redis -p 6379:6379 redis:7.2.4
5152
```
5253

@@ -62,7 +63,7 @@ docker pull aerospike:<version>
6263
```bash
6364
docker run -d --name aerospike -e "NAMESPACE=<namespace>" -p <host_port>:<container_port> aerospike:<version>
6465

65-
// Example (the host will be defined as localhost by default)
66+
# Example (the host will be defined as localhost by default)
6667
docker run -d --name aerospike -e "NAMESPACE=prebid_cache" -p 3000:3000 aerospike:ce-6.4.0.2_1
6768
```
6869

@@ -74,8 +75,8 @@ docker ps
7475
(3). Start the Maven build
7576

7677
```bash
77-
$ cd prebid-cache-java
78-
$ mvn clean package
78+
cd prebid-cache-java
79+
mvn clean package
7980
...
8081
[INFO] Layout: JAR
8182
[INFO] ------------------------------------------------------------------------
@@ -108,7 +109,7 @@ java -jar prebid-cache.jar -Dspring.profiles.active=manage,local -Dlog.dir=/app/
108109

109110
_VM Options:_
110111
```bash
111-
$ java -jar prebid-cache.jar -Dspring.profiles.active=prod -Dlog.dir=/app/prebid-cache-java/log/
112+
java -jar prebid-cache.jar -Dspring.profiles.active=prod -Dlog.dir=/app/prebid-cache-java/log/
112113
```
113114

114115
### _Cache Configuration_
@@ -195,7 +196,6 @@ A configuration object should be passed into the constructor of your custom repo
195196
this.config = config;
196197
}
197198
}
198-
199199
```
200200

201201
Here is an example definition of a custom configuration property class. It is important to replace _'custom'_ with the correct cache implementation name (e.g. redis, memcached, aerospike, etc...). If Spring already provides a predefined configuration property prefix, please use that instead.
@@ -212,7 +212,6 @@ public class CustomPropertyConfiguration
212212
private String host;
213213
private int port;
214214
}
215-
216215
```
217216

218217
### _Metrics_
@@ -353,29 +352,29 @@ https://github.com/spring-projects/spring-boot/issues/12188
353352

354353
To launch the JAR from the command line (UNIX/Linux):
355354
```bash
356-
$ ./prebid-cache.jar
355+
./prebid-cache.jar
357356
```
358357

359358
For security reasons, it is recommended to run the service as a non-root user:
360359
```bash
361-
$ sudo useradd prebid-cache
362-
$ sudo passwd prebid-cache
363-
$ sudo chown prebid-cache:prebid-cache prebid-cache.jar
364-
$ sudo chmod 500 prebid-cache.jar
360+
sudo useradd prebid-cache
361+
sudo passwd prebid-cache
362+
sudo chown prebid-cache:prebid-cache prebid-cache.jar
363+
sudo chmod 500 prebid-cache.jar
365364
```
366365

367366
###### B. System V Init
368367

369368
Symbolic link JAR to init.d:
370369
```bash
371-
$ sudo ln -s /app/prebid-cache.jar /etc/init.d/prebid-cache
370+
sudo ln -s /app/prebid-cache.jar /etc/init.d/prebid-cache
372371
```
373372

374373
```bash
375-
$ sudo service prebid-cache start # start service
376-
$ sudo service prebid-cache status # check status
377-
$ sudo service prebid-cache stop # stop service
378-
$ sudo service prebid-cache restart # restart service
374+
sudo service prebid-cache start # start service
375+
sudo service prebid-cache status # check status
376+
sudo service prebid-cache stop # stop service
377+
sudo service prebid-cache restart # restart service
379378
```
380379

381380
Following these steps will allow for:
@@ -386,7 +385,7 @@ Following these steps will allow for:
386385
###### C. Systemd
387386

388387
/etc/systemd/system/prebid-cache.service:
389-
```bash
388+
```text
390389
[Unit]
391390
Description=Prebid Cache Service
392391
After=syslog.target
@@ -398,13 +397,12 @@ SuccessExitStatus=143
398397
399398
[Install]
400399
WantedBy=multi-user.target
401-
402400
```
403401
Now you can manage this service with systemctl:
404402
```bash
405-
$ systemctl start prebid-cache.service # start service
406-
$ systemctl stop prebid-cache.service # stop service
407-
$ systemctl status prebid-cache.service # check status
403+
systemctl start prebid-cache.service # start service
404+
systemctl stop prebid-cache.service # stop service
405+
systemctl status prebid-cache.service # check status
408406
```
409407
For more details please refer to man pages for systemctl.
410408

@@ -415,38 +413,39 @@ This section describes how to run the app in an Elastic Beanstalk environment wi
415413

416414
(1). Go to the project root:
417415
```bash
418-
$ cd prebid-cache-java
416+
cd prebid-cache-java
419417
```
420418

421419
(2). Update codebase :
422420
```bash
423-
$ git pull
421+
git pull
424422
```
425423

426424
(3). Rebuild sources with Maven
427425
```bash
428-
$ mvn clean gplus:execute package
426+
mvn clean gplus:execute package
429427
```
430428

431429
(4). Create folder in work directory:
432430
```bash
433-
$ mkdir aws-prebid-cache
431+
mkdir aws-prebid-cache
434432
```
435433

436434
(5). Copy jar file from prebid-cache-java/target to created directory:
437435
```bash
438-
$ cp prebid-cache-java/target/prebid-cache.jar aws-prebid-cache
436+
cp prebid-cache-java/target/prebid-cache.jar aws-prebid-cache
439437
```
440438

441439
(6). Create Procfile in aws-prebid-cache directory:
442440
```bash
443-
$ sudo nano Procfile
441+
sudo nano Procfile
442+
444443
web: java -jar -Dspring.profiles.active=aws prebid-cache.jar
445444
```
446445

447446
(7). Zip aws-prebid-cache directory
448447
```bash
449-
$ zip -r eb-prebid-cache-new.zip eb-prebid-cache-new
448+
zip -r eb-prebid-cache-new.zip eb-prebid-cache-new
450449
```
451450
Artifact is ready for deploy to Elastic Beanstalk.
452451
For more information, see https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/java-se-platform.html.
@@ -526,17 +525,17 @@ For using the latest version of prebid cache, perform next steps:
526525

527526
(1). Go to the project root:
528527
```bash
529-
$ cd prebid-cache-java
528+
cd prebid-cache-java
530529
```
531530

532531
(2). Update codebase:
533532
```bash
534-
$ git pull
533+
git pull
535534
```
536535

537536
(3). Rebuild sources with Maven
538537
```bash
539-
$ mvn clean gplus:execute package
538+
mvn clean gplus:execute package
540539
```
541540

542541
If there are any questions, issues, or concerns, please submit them to https://github.com/prebid/prebid-cache-java/issues/.

0 commit comments

Comments
 (0)