Skip to content

Commit

Permalink
Update deployment instructions in README
Browse files Browse the repository at this point in the history
  • Loading branch information
johnmara committed Feb 16, 2021
1 parent 55d8b5f commit 397aeac
Showing 1 changed file with 40 additions and 7 deletions.
47 changes: 40 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,31 +19,64 @@ The application is a Web Application, written in Spring Boot with MVC pattern.
For page rendering, thymeleaf is used. For persistence layer, JPA with Hibernate is used.
Regarding the database, it is tested with MySQL but any Relation database should work.

# Deployment

## Deploy the application
A demo is already deployed under [Simplinvoice Demo](https://simplinvoice.eu)
## Demo environment
A demo is already deployed under [Simplinvoice Demo](https://simplinvoice.eu)
_Send me an email in order to enable you, after your registration.
In demo environment, invoices are sent to a mock endpoint._

### System Requirements
## Local deployment

### Manual

#### System Requirements
- Java 1.8+
- Relational Database (MySQL is recommended)

In order to run the application, run
#### Deploy
In order to create the executable, run
```bash
>mvn package
```
Then, you need to set the following **Environment Variables**.
**Windows**
```bash
>set MYSQL_HOST=HOST:PORT
>set MYSQL_USER=YOUR_DB_USER
>set MYSQL_PASS=YOUR_DB_PASS
>set MYSQL_DB=YOUR_DB_NAME
>set AADE_MYDATA_URL=https://mydata-dev.azure-api.net
```
java -jar simplinvoice-1.0.0.jar
**Linux**
```bash
>export MYSQL_HOST=HOST:PORT
>export MYSQL_USER=YOUR_DB_USER
>export MYSQL_PASS=YOUR_DB_PASS
>export MYSQL_DB=YOUR_DB_NAME
>export AADE_MYDATA_URL=https://mydata-dev.azure-api.net
```
In order to run the application, run
```bash
>java -jar simplinvoice-X.X.X.jar
```
Application will be reachable at `http://localhost:8080`.
You can also register it as windows or linux service in order to run it as daemon.

#### Docker
### Docker
You can also deploy the application with a Docker container.
You can use [this](Dockerfile) Dockerfile to build the image and then run
```
```bash
docker build -t IMAGE_NAME .
docker run --name CONTAINER_NAME -p 8480:8080 \
-e MYSQL_HOST='HOST:PORT' \
-e MYSQL_USER='YOUR_DB_USER' \
-e MYSQL_PASS='YOUR_DB_PASS' \
-e MYSQL_DB='YOUR_DB_NAME' \
-e AADE_MYDATA_URL='https://mydata-dev.azure-api.net' \
-d IMAGE_NAME
```
Application will be reachable at `http://localhost:8480`.

## Contribute
You can fork the project and start working with any open issue which is available here [Simplinvoice Open Issues](https://github.com/johnmara/simplinvoice/issues)
Expand Down

0 comments on commit 397aeac

Please sign in to comment.