Skip to content

AATAMS #15

@bhasin85

Description

@bhasin85
  1. Install git and curl
  2. Clone repository
    $ git clone https://github.com/aodn/aatams.git
  3. Switch to aatams project directory
    $ cd aatams
  4. Install SDKMAN
  5. Install Grails
    $ sdk use grails 1.3.7
  6. Install Java
    $ sdk use java 6u93-zulu
  7. Install Postgres and PostGIS
  8. Setup database (see the content of init-db.sh below)
    Create init-db.sh and run it using $ sudo -u postgres ./init_db.sh
  9. Running app for local development
    $ grails clean
    $ grails run-app
  10. Running test
    $ grails clean
    $ sudo -u postgres ./init_test_db.sh
    $ grails test-app --echoOut

init-db.sh

PSQL_ARGS=${1:--U postgres}
psql $PSQL_ARGS -c "drop database if exists aatams" || exit
psql $PSQL_ARGS -c "drop user if exists aatams" || exit
psql $PSQL_ARGS -c "create user aatams unencrypted password 'aatams'" || exit
psql $PSQL_ARGS -c "create database aatams owner aatams" || exit
psql $PSQL_ARGS -c "create extension postgis" aatams || exit
psql $PSQL_ARGS -c "create schema aatams authorization aatams" aatams || exit
psql $PSQL_ARGS -c "alter database aatams set search_path to 'aatams', 'public'" aatams || exit
psql $PSQL_ARGS -c "alter database aatams set timezone to 'Australia/Hobart'" aatams || exit

## Setting up database for integration tests

sudo -u postgres./init_test_db.sh

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions