Skip to content

alf.io - The open source ticket reservation system for conferences, trade shows, workshops, meetups

License

Notifications You must be signed in to change notification settings

alfio-event/alf.io

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Folders and files

NameName
Last commit message
Last commit date
Jan 29, 2015
Sep 12, 2015
Jul 28, 2015
Feb 16, 2016
Aug 19, 2014
Aug 15, 2015
Sep 8, 2015
Dec 10, 2015
Nov 22, 2015
Sep 3, 2015
Jul 26, 2014
Dec 10, 2015
Dec 10, 2015
Feb 16, 2016
Jan 29, 2015
Jan 29, 2015
Oct 29, 2015
Dec 20, 2015
Jan 29, 2015

Repository files navigation

alf.io

alf.io

Build Status Coverage Status Coverity Scan Build Status

Prerequisites

You should have installed Java version 8 (either Oracle's or OpenJDK) in order to build and run alf.io. Please note that for the build process the JDK is required.

Run on your machine

Gradle Build

This build includes a copy of the Gradle wrapper. You don't have to have Gradle installed on your system in order to build the project. Simply execute the wrapper along with the appropriate task, for example

./gradlew clean

### Running with multiple profiles

You must specify a project property at the command line, such as

./gradlew -Pprofile=dev :bootRun

The following profiles are supported

  • dev
  • dev-pgsql
  • dev-mysql
  • docker-test

You can get a list of all supported Gradle tasks by running

./gradlew tasks --all

You can configure additional System properties (if you need them) by creating the following file and putting into it one property per line:

vi custom.jvmargs

please be aware that since this file could contain sensitive information (such as Google Maps private API key) it will be automatically ignored by git

Docker images

Alf.io is also offered has a 3 tier application using 3 docker images:

  • postgres --> docker official image for PostgreSQL database
  • exteso/alfio-web --> application runtime. Docker image is generate from this project (see below).
  • tutum/haproxy --> front layer proxy, force redirect to https and support load-balancing if multiple alfio-web instances are running

Generate a new version of the exteso/alfio-web docker image

  • Build application and Dockerfile: "./gradlew distribution"
  • Enter directory: "cd build/dockerize"
  • Create docker image: "docker build -t exteso/alfio-web ."

Publish a new version of the exteso/alfio-web on docker hub

TODO

Launch alf.io container instances

  • define local directory for database data (on docker host, in order for data to survive postgres image restarts): /path/to/local/data = /data/postgres/alfio
  • define a local directory for logs: /path/to/logs = /home/alfio/logs
  • docker run --name alfio-db -e POSTGRES_DB=postgres -e POSTGRES_USERNAME=postgres -e POSTGRES_PASSWORD=alfiopassword --restart=always -d -v /path/to/local/data:/var/lib/postgresql/data postgres
  • docker run --name alfio-web --link alfio-db:db -v /path/to/logs:/alfio/logs -d exteso/alfio-web
  • docker run --name alfio-proxy --link alfio-web:web1 -e SSL_CERT="$(awk 1 ORS='\n' src/main/dist/servercert.pem)" -e FORCE_SSL=yes -e PORT=8080 -p 443:443 -p 80:80 -d tutum/haproxy

### Test alf.io application

  • See alfio-web logs: "docker logs alfio-web" or "less /path/to/logs/alfio.log"
  • Copy admin password in a secure place
  • Get IP of your docker container: (only on Mac/Windows, on linux the proxy will bind directly on your public IP)
    • "boot2docker ip" on Mac/Windows
  • Open browser at: https://<DOCKER_IP>/admin
  • Insert user admin and the password you just copied