- Operating system Ubuntu 14.04 or above is preferred. (This guide will be based on ubuntu/debian based operating systems.)
- Python 2.7
- Oracle JDK 8
- Android SDK & necessary build tools and platform SDKs
- Redis Server
git clone https://github.com/fossasia/open-event-android.git && cd open-event-android
export PROJECT_DIR=$(pwd)
sudo dpkg --add-architecture i386
sudo apt-get install -y software-properties-common git wget libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5 lib32z1 curl libqt5widgets5
sudo apt-get install -y ca-certificates && update-ca-certificates
sudo apt-get install -y python python-dev python-pip libpq-dev libevent-dev libmagic-dev
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer oracle-java8-set-default
sudo cp kubernetes/images/generator/tools /opt
sudo ./kubernetes/images/generator/android.sh
export ANDROID_HOME="/opt/android-sdk-linux"
export PATH=${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools
You can follow the Redis Installation Guide to install and activate Redis Server on your machine.
Let's go into the app generator's directory
cd ${PROJECT_DIR}/apk-generator/v2/
sudo -H pip install -r requirements.txt
export KEY_ALIAS=debug
export KEYSTORE_PASSWORD=debug
export KEYSTORE_PATH=$(pwd)/keystore/debug.keystore
keytool -genkey -noprompt \
-alias ${KEY_ALIAS} \
-dname "CN=localhost, OU=SG, O=SomeName, L=SomeCountry, S=SomeCountry, C=SG" \
-keystore ${KEYSTORE_PATH} \
-storepass ${KEYSTORE_PASSWORD} \
-keypass ${KEYSTORE_PASSWORD} \
-keyalg RSA \
-keysize 2048 \
-validity 10000
Set the appropriate config class to use as an environment variable
export APP_CONFIG=config.DevelopmentConfig # for a development environment
export APP_CONFIG=config.ProductionConfig # for a production environment
export APP_CONFIG=config.TestingConfig # for a testing environment
Set the URI to your redis instance as an environment variable
export REDIS_URL=redis://localhost:6379/0
celery worker -A app.celery &
gunicorn -b 0.0.0.0:8080 app:app --enable-stdio-inheritance --log-level "info"
You can now visit http://localhost:8080 on your browser to access the app generator.