Git Product home page Git Product logo

catcha's Introduction

Stories in Ready Build Status Documentation Status

catcha

Catching Annotation (Catch-A)

This software was created for the Harvard Library Labs project CATCH (https://osc.hul.harvard.edu/liblab/proj/catch) awarded to Phil Desenne, Martin Schreiner and Paolo Ciccarese

The software was originally written by:

You can find the core plugin dependencies at https://github.com/annotationframework.

Getting Started

Developer Installation

Install dependencies

Install GVM

See http://gvmtool.net/

$ curl -s get.gvmtool.net | bash

Install Grails

After downloading the source code check catcha/Catch/application.properties to find the required Grails version.

app.grails.version=2.2.1

To install the appropriate grails version:

$ gvm install grails 2.2.1

MySQL

See http://dev.mysql.com/downloads/installer/. On Ubuntu

sudo apt-get install mysql-server

Build application from source

Download application source code

$ git clone https://github.com/annotationsatharvard/catcha.git

Download plugin source code

There are several plugins that are included as "local plugin" dependencies within the application's BuildConfig.groovy. It's important that the root directory of these plugins (annotationframework) is located at the same level as the catcha directory.

$ mkdir annotationframework
$ cd annotationframework
$ git clone https://github.com/annotationframework/AfPersistence.git
$ git clone https://github.com/annotationframework/AfSecurity.git
$ git clone https://github.com/annotationframework/AfShared.git
Create database
mysql -u root -p -e 'create database catch default charset utf8;'
Create database user
mysql -u root -p -e 'grant all on catch.* to "catch"@"localhost" identified by "<password>";'
Create external configuration file

If you changed the database name, username, or password you need to edit an external configuration file.

NOTE: I needed to rename the file (lowercase 'c') in order to get the application to read this file.

$ cd Catch
$ mv Catch-config.properties catch-config.properties

Add the following properties to catcha/Catch/catch-config.properties.

# Database connection settings
dataSource.url=jdbc:mysql://localhost:3306/catch?autoReconnect=true&zeroDateTimeBehavior=convertToNull&sessionVariables=storage_engine=InnoDB
dataSource.username=catch
dataSource.password=<password>

NOTE: Do NOT change the database name as there is a bug I just discovered in the Liquibase changesets that hard-codes the schema name to "catch" when dealing with foreign key contstraints.

Run application in development mode

$ grails run-app

Develop with Docker

When developing with Docker, all the dependencies are included in docker images. No need to install anything on the host other than (docker)[https://docs.docker.com/engine/installation/]

NOTE: This repo has submodules. If --recursive is not specified when cloning the repo, you need to run git submodule update --init to pull down the submodules.

Update configruation

Update the following line in catch-config.properties:

dataSource.url=jdbc:mysql://localhost:3306/catch_test?useUnicode=yes&characterEncoding=UTF-8&autoReconnect=true

To

dataSource.url=jdbc:mysql://db:3306/catch?useUnicode=yes&characterEncoding=UTF-8&autoReconnect=true

Start application

docker-compose up -d

Docker will download official MySQL image and build catcha image. Docker-compose will create a docker network and run both images. Once they are started, the application can be accessed at http://localhost:8080.

Once the docker containers are running, you can make changes to the files on the host and they will be auto-reloaded.

Check logs

docker logs -f catch_app_1

Stop application

docker-compose stop

Tear down application

docker-compose down

catcha's People

Contributors

jmiranda avatar paolociccarese avatar waffle-iron avatar xcompass avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.