Skip to content

Commit 0217a04

Browse files
authored
Update README.md
Explained the pre-built WAR file more exhaustively
1 parent 3a743c4 commit 0217a04

1 file changed

Lines changed: 23 additions & 5 deletions

File tree

README.md

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,40 @@
11
# EDI-NG_server
22
This is the server side for [SP7-Ritmare/EDI-NG_client](https://github.com/SP7-Ritmare/EDI-NG_client).
33

4-
It's a [Spring](http://spring.io) Boot application configured to package as a WAR file, so as to allow deployment to, e.g., [Tomcat](http://tomcat.apache.org).
4+
It's a [Spring](http://spring.io) Boot application configured to package as a WAR file, so as to allow deployment to, e.g., [Tomcat](http://tomcat.apache.org), relying on a [PostgreSQL](https://www.postgresql.org) database server.
55
In order to deploy to Tomcat, you need to place the WAR file in Tomcat's webapps directory, or upload it via the Tomcat manager application.
66

7-
[Binary WAR file](https://github.com/SP7-Ritmare/EDI-NG_server/releases/download/v1.0/edi.war) is available via the "releases" tab.
7+
A [Binary WAR file](https://github.com/SP7-Ritmare/EDI-NG_server/releases/download/v1.0/edi.war) is available via the "releases" tab.
88
The WAR has been tested on Tomcat 7.
99

10-
> You will probably not need the pre-packaged WAR, anyway, because it points to our own installation of the PostgreSQL database.
11-
> You should edit your copy (https://github.com/SP7-Ritmare/EDI-NG_server/blob/master/EDI-T/src/main/resources/application.properties) file and change the spring.datasource.* entries to point to your own PostgreSQL installation.
12-
> **Warning**: deploying the WAR file will create all necessary tables, but it WILL NOT create the database.
10+
> The pre-packaged WAR file can be a good starting point to test the system in a reasonably "standalone" mode.
1311
12+
> It contains a built-in version of EDI-NG_client where the templates point to the EDI-NG_server packaged within, with the following pre-requisites:
13+
> * Tomcat should run on port 8080
14+
> * PostgreSQL must be installed on a host reachable from your Tomcat machine
15+
> * An empty database must be created in the PostgreSQL server
16+
> * Once deployed, you'll need to change the application.war file, present in your Tomcat host's $TOMCAT_HOME/webapps/edi/WEB-INF/classes/ directory, and then restart Tomcat
17+
>
18+
19+
Following is an example of the configuration you need to edit in $TOMCAT_HOME/webapps/edi/WEB-INF/classes/application.properties
20+
```properties
21+
spring.datasource.url=jdbc:postgresql://<your PostreSQL host>/<db name you picked>
22+
spring.datasource.username=<username>
23+
spring.datasource.password=<password>
24+
spring.datasource.driverClassName=org.postgresql.Driver
25+
```
26+
27+
Once all prerequisites are met, you can test the EDI-NG_client and server by pointing your browser to http://localhost:8080/ on your Tomcat machine.
28+
29+
## Building your own WAR file
1430
If you want to build the latest release from sources, you can user [Apache Maven](https://maven.apache.org/index.html) (Apache License v2.0). In the EDI-T directory, simply run:
1531
```bash
1632
mvn package
1733
```
1834
This will create your WAR file in the target directory, ready for deployment.
1935

36+
Prior to create the WAR file you might want to customise the application.properties file, mentioned above, so as to match your PostgreSQL location.
37+
2038
# Dependencies
2139
All dependencies are listed in the *pom.xml* file.
2240

0 commit comments

Comments
 (0)