Coder Social home page Coder Social logo

larp-platform's Introduction

LARP-Platform Build Status

Here is a little manual:

  • Install JDK 1.8
  • Install Grails
  • Install PostgreSQL and create database for application
  • Run grails application.

How to install and configure JDK?

Download and extract Oracle Java SE Development Kit 8 or OpenJDK 8. Then add to ~/.profile file this line:

export JAVA_HOME=<path-to-jdk>
PATH=$PATH:$JAVA_HOME/bin

You can also install JDK via standart repositories:

sudo apt-get install openjdk-8-jdk

If JDK already installed in your system there may be some problems with default comands like java and javac. They can be linked with older version of Java. To know it exactly you should execute:

update-alternatives --config java

You will see a list of paths to different versions of JDK. Then choose a number of the correct version.

If there is no correct version, you can add it by the command:

update-alternatives --install /usr/bin/java java <path-to-jdk>/bin/java 1

Then try to configure symlink again and repeat this part for javac command.

How to install and configure Grails?

Download and extract Grails from official site. Then add to ~/.profile file this line:

export GRAILS_HOME=<path-to-grails>
PATH=$PATH:$GRAILS_HOME/bin

How to install PostgreSQL and create database?

Install PostgreSQL via standart repositories:

sudo apt-get install postgresql

If there is no russian locale in your system, you should install it:

sudo locale-get ru_RU.UTF-8

Then drop and create again cluster with russian locale:

sudo pg_dropcluster --stop <version> main
sudo pg_createcluster --locale ru_RU.UTF-8 <version> main

After this manipulations PostgreSQL daemon will be down. You should start it again:

sudo service postgresql start

In /etc/postgresql//main/pg_hba.conf add rules:

local sameuser all md5
local template1 all md5

And restart daemon.

Enter in PosgreSQL console like this:

sudo -upostgres psql

And create user and database:

#!sql
CREATE USER larp_platform ENCRYPTED PASSWORD 'larp_platform';
CREATE DATABASE larp_platform OWNER 'larp_platform';

To check connection try this:

psql -Ularp_platform

How to configure database settings?

Edit file grails-app/conf/DataSource.groovy:

#!groovy
dataSource {
    ...
    username = "larp_platform"
    password = "larp_platform"
}

...
environments {
    development {
        dataSource {
            ...
            url = "jdbc:postgresql://<host>:5432/larp_platform"
        }
    }
    ...
}

How to run application?

You can run application on internal tomcat (development mode by default):

grails [-Dgrails.server.port.http=8090] [dev|test|prod] run-app

Also you can deploy war-file on tomcat manualy. To build war-file execute (production mode by default):

grails [dev|test|prod] war

larp-platform's People

Contributors

sayonara-sama avatar serjantiquity avatar treble-snake avatar

Watchers

 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.