GithubHelp home page GithubHelp logo

lunatech-labs / lunatech-lunch-planner Goto Github PK

View Code? Open in Web Editor NEW
6.0 51.0 2.0 1.13 MB

Home Page: https://lunch.lunatech.nl/

Scala 63.42% HTML 12.60% Shell 0.06% JavaScript 1.12% CSS 22.60% PLpgSQL 0.14% Dockerfile 0.05%
scala play play-slick google-api-client postgresql

lunatech-lunch-planner's Introduction

Build Status

This is the source code for the Lunatech Lunch Planner application

This is a Play Framework 2 application. The application will allow Lunatech do manage friday lunches' menus and the people that are attending those lunches.

To get started:

Set up authentication for github packages

If you have not done so yet you have to configure authentication for github packages, because this app depends on some lunatech provided jars hosted there.

For this you need to generated a github personal access token (https://github.com/settings/tokens) with access to at least the following scope: write:packages.

This can be provided to the build in two ways:

  1. Set the environment variable GITHUB_TOKEN
  2. Configure it in your git config (e.g.: $HOME/.gitconfig) with the following command: git config --global github.token "<your token>"
Compile and run the docker container:

In /dockerdev/postgres run

docker build -t lunatech-lunch-planner .
docker run -it --rm -m 1024m -p 5432:5432 lunatech-lunch-planner
Create configuration override

Create a conf/override.conf file with the following fields:

PLAY_SECRET = xxx

POSTGRESQL_ADDON_HOST = localhost
POSTGRESQL_ADDON_PORT = 5432
POSTGRESQL_ADDON_DB = lunch-planner
POSTGRESQL_ADDON_USER = postgres
POSTGRESQL_ADDON_PASSWORD = password

GOOGLE_CLIENTID = xxx
GOOGLE_SECRET = xxx

SLACK_API_TOKEN = xxx
SLACK_HOST_NAME = xxx

administrators = ["[email protected]"]

Ensure that your database credentials are correct.

Start the app:
sbt run

Make sure the docker image withe the DB is running. Open the browser and you are all set:

localhost:9000
Run the tests:

To run the tests no docker image is necessary, instead an H2 in-memory DB has been set up

New developments

There are two permanent branches: master and clevercloud. All new developments are to be merged in master branch and tested locally and then later deployed by using the clevercloud branch.

Deployment

The lunch-planner is hosted in clever-cloud. The deployment is done by rebasing clevercloud branch onto master branch locally. This rebase will always be a fast-forward one.

Before doing a deployment make sure you have the latest versions of master and production branches. Rebase clevercloud onto master and push it. Clever-cloud will do the deployment automatically.

$ git checkout master
[master]$ git pull
[master]$ git checkout clevercloud
[clevercloud]$ git pull
[clevercloud]$ git rebase master
[clevercloud]$ git push

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.