Skip to content

Commit 2a91adc

Browse files
authored
Update README.md
Corrected README to reflect the deployment strategy change
1 parent 0256ae8 commit 2a91adc

1 file changed

Lines changed: 25 additions & 25 deletions

File tree

README.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,39 @@
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), relying on a [PostgreSQL](https://www.postgresql.org) database server.
5-
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.
6-
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.
8-
The WAR has been tested on Tomcat 7.
9-
10-
> The pre-packaged WAR file can be a good starting point to test the system in a reasonably "standalone" mode.
11-
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
4+
It's a [Spring](http://spring.io) Boot application configured to package as a JAR file, relying on any [JPA](https://en.wikipedia.org/wiki/Java_Persistence_API) database connector, e.g. one to a [PostgreSQL](https://www.postgresql.org) database server.
5+
6+
A [demo JAR file](https://github.com/SP7-Ritmare/EDI-NG_server/releases/download/v1.0/edi.war) is available in the [demo](https://github.com/SP7-Ritmare/EDI-NG_server/tree/master/demo) directory.
7+
8+
> The pre-packaged JAR file can be a good starting point to test the system in a "standalone" mode.
9+
10+
> It contains a built-in version of EDI-NG_client where the templates point to the EDI-NG_server packaged within.
11+
12+
> **WARNING!** Demo configuration uses the [H2 in-memory database](http://www.h2database.com/html/main.html) so as to simplify EDI's configuration. **As it is an in-memory database, data won't survive a restart of the application**.
13+
14+
All you need to do is open a terminal, go to the demo directory you downloaded, and run
15+
16+
```bash
17+
./edi.sh
2518
```
2619

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.
20+
Then just point your browser to http://localhost:8080/
2821

29-
## Building your own WAR file
22+
## Building your own JAR file
3023
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:
3124
```bash
3225
mvn package
3326
```
34-
This will create your WAR file in the target directory, ready for deployment.
27+
This will create your JAR file in the target directory, ready for deployment.
28+
29+
As an alternative, you can go to the "demo" directory and run:
30+
```bash
31+
./create_demo.sh
32+
```
33+
34+
This will update the JAR in the demo directory and launch it with the local application.properties file as a configuration.
3535

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.
36+
Prior to creating the JAR file you might want to customise the application.properties file, mentioned above, so as to match your database desired location.
3737

3838
# Dependencies
3939
All dependencies are listed in the *pom.xml* file.

0 commit comments

Comments
 (0)