README.md 1.45 KB
Newer Older
1 2
# Genesys PGR - Gateway to genetic resources

Matija Obreza's avatar
Matija Obreza committed
3 4 5 6 7
**Note:** This is the source code of the Genesys PGR Portal implementation running at <https://www.genesys-pgr.org>

These instructions will help you run a copy of the Genesys portal (without the data) for testing and development purposes.

## Running genesys2-server with Docker
Matija Obreza's avatar
Matija Obreza committed
8

Matija Obreza's avatar
Matija Obreza committed
9
```shell
Matija Obreza's avatar
Matija Obreza committed
10
docker run dockerhub.croptrust.org/genesys-pgr/genesys-server:2.3
Matija Obreza's avatar
Matija Obreza committed
11 12 13
```

The genesys container can be configured via environment variables (`-e` docker flag).
14

Matija Obreza's avatar
Matija Obreza committed
15 16
## Running genesys2-server with maven

17
- Clone the project code: `git clone ...`
Matija Obreza's avatar
Matija Obreza committed
18
- Create a blank mysql database
19 20
- Configure genesys2-server database connection settings (see below)
- Start Genesys server with `mvn jetty:run`
21

Matija Obreza's avatar
Matija Obreza committed
22
### Creating a mysql database
23

Matija Obreza's avatar
Matija Obreza committed
24
Connect to your mysql instance and create a new blank database **genesys**:
25

Matija Obreza's avatar
Matija Obreza committed
26 27 28
```sql
-- Create database
CREATE DATABASE genesys DEFAULT CHARSET UTF8;
Matija Obreza's avatar
Matija Obreza committed
29

Matija Obreza's avatar
Matija Obreza committed
30 31 32
-- Create user genesys with password pwd
GRANT ALL ON genesys.* TO 'genesys'@'localhost' IDENTIFIED BY 'pwd';
```
33

34
Change the settings in a new file `src/main/resources/genesys.properties`:
35

Matija Obreza's avatar
Matija Obreza committed
36 37 38 39 40 41 42 43 44 45 46
```.properties
# genesys2 with mysql database
db.url=jdbc:mysql://localhost/genesys?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
db.driverClassName=com.mysql.jdbc.Driver
hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
db.username=genesys
db.password=pwd
db.showSql=false
# Allow hibernate to update database (development/testing mode only)
db.hbm2ddl=update
```