animal documentation webapp written in Grails
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
gradle/wrapper
grails-app
src
.asscache
.gitignore
LICENSE
README.md
build.gradle
gradle.properties
gradlew
gradlew.bat

README.md

grails3-animals

It's a animal documentation webapp written in Grails. In the basic configuration it uses the h2 database engine, but you can configure other databases as datasource (see configuration/database). The HTML5 UI is based on the free BootStrap Template AdminLTE. You can upload images. Web optimized sizes and thumbnails will be generated automatically. If you use these feature you need an additional webserver like apache or nginx.

Installation

For Installation from Source you need the Grails Framework and java and if you want an other relational database (like mysql, mariadb or postgresql). Both are easy to install with sdkman.

sdk install java
sdk install grails
git clone https://github.com/gklinkmann/grails3-animals.git
cd grails3-animals
grails run-app

Grails offers a standalone application (including jetty or tomcat as application server) and a war file as deployment target. 3 Environments (dev, test, prod) are available.

standalone

grails package
java -Dgrails.env=prod -jar build/libs/grails3-animals-0.2.war

war file

grails prod war

The generated war file (in the build/libs directory) can you drop into a supported application server.

usage

Open the url http://localhost:8080/animals in your Browser.

Configuration

Database

An alternative database can you configure in dataSource and environments sections of grails-app/conf/application.yml. Here is an example for mysql database with name animals_dev. Username and password have to change.

dataSource:
    pooled: true
    jmxExport: true
    driverClassName: com.mysql.jdbc.Driver
    username: yourUser
    password: yourPassword

environments:
    development:
        dataSource:
            dbCreate: update
            url: jdbc:mysql://localhost:3306/animals_dev

Webserver

The path and the url of the images can you configure in environments section of grails-app/conf/application.yml.

apache:
    serverURL: 'http://localhost/~gklinkmann/${info.app.name}'
de:
    koo:
        animals:
            images:
                path: '/Users/gklinkmann/public_html/animals/images/animals'
                url: '${apache.serverURL}/images/animals'

User

The application comes with to predefined users (user and admin). The default password is equal to the username. You can change it in grails-app/init/BootStrap.groovy

def admin = new User(username: 'admin', password: 'admin', firstname:"Ad", lastname:"Min", email:"admin@gmail.com")