blob: cc66dd88dea458cc40fcdc9e565ea35488b81ec9 (
plain)
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
52
53
54
55
56
57
58
59
|
This directory contains everything to build a deb package that bundles a Spring Boot app that starts a web server.
####
Executable scripts:
create-new-project.sh - This script can be used to create a new deb package project similar to this project that uses a different name (than ceit-fs-resource-server). Output will be placed inside 'out' directory.
build.sh - This script builds the deb package. If the above script is used, go to the corresponding directory inside out directory to find a copy of this build.sh script.
####
To create a new deb package project that uses 'mycompany-myapp' as the name, run the following command:
./create-new-project.sh mycompany mycompany-myapp
The newly generated project files will be found inside the out directory.
####
To build, run the following command:
./build.sh
Note that the Spring Boot application has not been bundled with this. You need to build it seperately and put it in the correct directory (run build.sh for further details).
####
To install the build deb package run the following commands replacing the package.deb with the correct name of the deb file.
cp package.deb /tmp
cd /tmp
apt install ./package.deb
The above "apt install" will download dependencies if needed. Otherwise, dpkg command can just be used to install or upgrade the package:
dpkg -i package.deb
After installing the package, update the configuration file /etc/ceit-fs-resource-server/application.yaml .
Enable service to start at boot time:
systemctl enable ceit-fs-resource-server
Start service:
systemctl start ceit-fs-resource-server
View service log:
journalctl -u ceit-fs-resource-server -f
(Press CTRL+C to terminate log viewing)
Access the service:
http://server-ip-or-hostname:8085/
(Instead of 8085, use the port configured in application.yaml file)
|