File tree 2 files changed +24
-14
lines changed
2 files changed +24
-14
lines changed Original file line number Diff line number Diff line change 1
1
name : Create and publish Docker image
2
2
3
3
on :
4
- release :
5
- types : [published]
4
+ push :
5
+ tags :
6
+ - ' v*'
6
7
7
8
env :
8
9
REGISTRY : ghcr.io
34
35
uses : docker/metadata-action@v3
35
36
with :
36
37
images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
38
+ tags : |
39
+ type=semver,pattern={{version}}
40
+
37
41
- name : Build and push
38
42
uses : docker/build-push-action@v2
39
43
with :
Original file line number Diff line number Diff line change @@ -13,13 +13,6 @@ Build using the following command in the project directroy;
13
13
$ gradle build
14
14
```
15
15
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
- ```
23
16
24
17
## Deploy
25
18
@@ -29,19 +22,32 @@ Deploy locally;
29
22
$ java -jar build/libs/lexidb-2.0.jar /path/to/app.properties
30
23
```
31
24
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
32
31
```
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:
35
40
36
41
```
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
38
43
```
39
44
45
+ To run the docker instance with a custom java maximum memory allocation of 6GB and total docker memory usage of 8GB:
46
+
40
47
```
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
42
49
```
43
50
44
-
45
51
## Test
46
52
47
53
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 )
You can’t perform that action at this time.
0 commit comments