Skip to content

Commit 185a9eb

Browse files
committed
More documentation on how to run the docker instance
1 parent fd05e0d commit 185a9eb

File tree

2 files changed

+24
-14
lines changed

2 files changed

+24
-14
lines changed

.github/workflows/package.yml

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
name: Create and publish Docker image
22

33
on:
4-
release:
5-
types: [published]
4+
push:
5+
tags:
6+
- 'v*'
67

78
env:
89
REGISTRY: ghcr.io
@@ -34,6 +35,9 @@ jobs:
3435
uses: docker/metadata-action@v3
3536
with:
3637
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
38+
tags: |
39+
type=semver,pattern={{version}}
40+
3741
- name: Build and push
3842
uses: docker/build-push-action@v2
3943
with:

readme.md

+18-12
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,6 @@ Build using the following command in the project directroy;
1313
$ gradle build
1414
```
1515

16-
## Running on Docker
17-
18-
There is a docker instance of LexiDB which can be ran using the following command:
19-
20-
``` bash
21-
docker run -it -p 127.0.0.1:3000:1189 --rm ucrel/lexidb:0.0.1
22-
```
2316

2417
## Deploy
2518

@@ -29,19 +22,32 @@ Deploy locally;
2922
$ java -jar build/libs/lexidb-2.0.jar /path/to/app.properties
3023
```
3124

25+
## Running on Docker
26+
27+
There is a docker instance of LexiDB which can be ran using the following command, this Docker instance was built from the [Dockerfile](./Dockerfile):
28+
29+
``` bash
30+
docker run -it -p 127.0.0.1:3000:1189 --rm --init ghcr.io/ucrel/lexidb:latest
3231
```
33-
docker run -it -p 127.0.0.1:3000:1189 --rm lexidb:0.0.1
34-
```
32+
33+
By default it uses the [app.properties from ](./src/main/resources/app.properties).
34+
35+
### Custom docker run command examples
36+
37+
#### Different memory settings
38+
39+
To run the docker instance with a custom java maximum memory allocation of 6GB:
3540

3641
```
37-
docker run -it -p 127.0.0.1:3000:1189 --init --entrypoint "java" --rm lexidb:0.0.1 -Xmx8g -jar lexidb-2.0.jar ./app.properties
42+
docker run -it -p 127.0.0.1:3000:1189 --init --entrypoint "java" --rm ghcr.io/ucrel/lexidb:latest -Xmx6g -jar lexidb-2.0.jar ./app.properties
3843
```
3944

45+
To run the docker instance with a custom java maximum memory allocation of 6GB and total docker memory usage of 8GB:
46+
4047
```
41-
docker run -it -p 127.0.0.1:3000:1189 --init --entrypoint "java" --memory=8g --memory-swap=8g --rm lexidb:0.0.1 -Xmx8g -jar lexidb-2.0.jar ./app.properties
48+
docker run -it -p 127.0.0.1:3000:1189 --init --entrypoint "java" --memory=8g --memory-swap=8g --rm ghcr.io/ucrel/lexidb:latest -Xmx6g -jar lexidb-2.0.jar ./app.properties
4249
```
4350

44-
4551
## Test
4652

4753
You can test whether the server is running by making a simple API call in your browser; [http://localhost:1189/api/test](http://localhost:1189/api/test)

0 commit comments

Comments
 (0)