29

GitHub - alfio-event/alf.io: alf.io - The open source ticket reservation system...

 4 years ago
source link: https://github.com/alfio-event/alf.io
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

README.md

alf.io

alf.io

Financial Contributors on Open Collective Build Status Coverage Status Docker Hub Pulls Open Source Helpers

Warning

As the work for Alf.io v2 has started, this branch may contain unstable and untested code. If you want to build and deploy alf.io by yourself, we strongly suggest you to use the 2.0-M1-maintenance branch, as it contains production-ready code.

Prerequisites

You should have installed Java version 11 (e.g. Oracle's, OpenJDK, or any other distribution) to build and run alf.io. Please note that for the build process the JDK is required.

Postgresql version 9.6 or later.

Additionally, the database user that creates and uses the tables should not be a "SUPERUSER", or else the row security policy checks will not be applied.

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 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 local "bootRun" task has the following prerequisites:

  • a PostgreSQL (version 9.6 or later) instance up and running on localhost:5432
  • a postgres user having a password: password
  • a database named alfio

once started, alf.io will create all the required tables in the database, and be available at http://localhost:8080/admin. You can log in using the default Username admin and the password which was printed on the console.

Note: if you want to test without installing a pgsql instance, we have configured the following tasks:

  • startEmbeddedPgSQL
  • stopEmbeddedPgSQL

So, in a terminal first launch pgsql:

./gradlew startEmbeddedPgSQL

In another one launch alf.io

./gradlew -Pprofile=dev :bootRun

When you are done, kill the pgsql instance with:

./gradlew stopEmbeddedPgSQL

The following profiles are supported

  • dev
  • dev-pgsql
  • 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.

For debug

Add a new line with: -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 in custom.jvmargs

Developing alf.io

Importing the Gradle project into Intellij and Eclipse both work.

Note: this project uses Project Lombok. You will need to install the corresponding Lombok plugin for integration into your IDE.

Check dependencies to update

./gradlew dependencyUpdates

Docker

Container images are available on https://hub.docker.com/r/alfio/alf.io/tags.

alf.io can also be run with Docker Compose:

docker-compose up

If you plan on using Docker Compose to run alf.io in production, then you need to make a couple of changes:

  • Add a mapping for port 8443
  • Handle SSL termination (e.g. with something like tutum/haproxy)
  • Remove the SPRING_PROFILES_ACTIVE: dev environment variable

Test alf.io application

  • Check alfio logs: docker logs alfio
  • 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

Generate a new version of the alfio/alf.io docker image

  • Build application and Dockerfile:
./gradlew distribution
  • Enter the directory:
cd build/dockerize
  • Create docker image:
docker build -t alfio/alf.io .

About the included AppleWWDRCA.cer

The certificate at src/main/resources/alfio/certificates/AppleWWDRCA.cer has been imported for https://github.com/ryantenney/passkit4j#usage functionality. It will expire the 02/07/23 (as https://www.apple.com/certificateauthority/).

Available spring profiles:

  • dev: enable dev mode
  • spring-boot: added when launched by spring-boot
  • demo: enable demo mode, the accounts for the admin will be created on the fly
  • disable-jobs: disable jobs

Contributors

Code Contributors

This project exists thanks to all the people who contribute. 68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f616c66696f2f636f6e7472696275746f72732e7376673f77696474683d38393026627574746f6e3d66616c7365

Financial Contributors

Become a financial contributor and help us sustain our community. [Contribute]

Individuals

68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f616c66696f2f696e646976696475616c732e7376673f77696474683d383930

Organizations

Support this project with your organization. Your logo will show up here with a link to your website. [Contribute]

68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f616c66696f2f6f7267616e697a6174696f6e2f302f6176617461722e737667 68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f616c66696f2f6f7267616e697a6174696f6e2f322f6176617461722e737667


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK