Code Monkey home page Code Monkey logo

cms-galatea's Introduction

CMS Galatea

A microservice that orbits around CMS exposing the Task and Contest core entities (alongside some embeded ones, like statements, datasets and testcases) as REST resources.

Up and running

CMS Galatea can be deployed and run as a Docker container or a standalone java application (a fat jar); either way is recommend to run this application as the former one.

Prerequisites

CMS Galatea relies on CMS database, so in order to have this application up and running you need:

  1. CMS 1.3.x or greater DB schema (the current Galatea version was designed against the last CMS revision in Jan 2018)
  2. CMS PostreSQL DB schema access (it could be the same crendentials that CMS uses but is not recommended)
  3. Docker engine 17.x or greater

Deployment

As long the prerequisites are met CMS Galatea can be run as easy as prompting

docker run -p 8080:8080 jossemargt/cmsgalatea

Have in mind that the application will run with the default configurations, which may not suit for your environment and because of that you should take a look into the Configuration section.

Configuration

All the intrinsic configurations can be overriden as Spring externalized configurations which in the Docker container context boild down to environment variables. As for example in order to override the spring.datasource.url value, you could start the Docker container with the following syntax:

docker run -p 8080:8080 -e 'SPRING_DATASOURCE_URL=jdbc:postgresql://10.10.37.10:5432/cmsdb' jossemargt/cmsgalatea

Some of the properties of interest could be:

Property name Default value Description
spring.datasource.username cmsuser JDBC + PostgreSQL datasource username
spring.datasource.password notsecure JDBC + PostgreSQL datasource password
spring.datasource.url jdbc:postgresql://localhost:5432 JDBC + PostgreSQL datasource URL
logging.file Logging file
logging.level.com.jossemargt.cmsgalatea ERROR Application logging level
logging.level.com.querydsl.jpa.impl.JPAQuery ERROR JPA query logging level
logging.level.org.hibernate.stat ERROR Hibernate stats logging level

Development / Getting started

In order to start hacking with this project you need:

Then it is only matter of cloning the repository

git clone https://github.com/jossemarGT/cms-galatea.git galatea
cd galetea

Open the source code with your preferred text editor, hack and test/build the results with maven:

mvn clean package

Build and releases

All the git (remote) branches and pull requests on this repository are being tracked by Travis CI, each commit source code is test and built, but only the git tags from master branch will be released as a Java artifact (jar) and Docker image.

If you need to reproduce the tagging and release cycle, you could manually use the following maven goals:

mvn versions:set -DnewVersion=$(git describe --abbrev=0 --tags)
mvn package dockerfile:build dockerfile:push

Versioning

This project use SemVer for versioning. For the versions available, see the tags on this repository.

Nuke and recreate the codebase with Spring Roo

The first CMS Galatea release was completely generated with spring-roo, if for some reason you need to recreate the whole codebase from scratch, you could use the gen/init.roo roo script.

License

This project is licensed under the MIT License - see the LICENSE file for details.

cms-galatea's People

Contributors

joelgtsantos avatar jossemargt 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.