Build from sources
Local running of the Flaxo application requires several additional configurations. If you don't need to build Flaxo from sources directly please use docker deploy which is more appropriate for a production environment.
To build and run Flaxo locally you should use one of the Linux distributive. Moreover you should do the following:
- Install Java 8 jdk and jre.
- Install docker and docker-compose.
- Install curl, gcc.
- Install nodejs.
Building
Before you can launch your Flaxo instance locally you should build the project. It includes compiling, running unit and integration tests and etc. Some of the build phases requires a specific environment to be configured especially integration tests.
To run Flaxo integration tests locally you should do the following:
- Create 3 GitHub accounts.
- Authorize one of the created GitHub accounts with Travis.
- Authorized the same GitHub account with Codacy.
- Generate created GitHub account access tokens with
repo
,delete_repo
scopes in github settings. - Generate Travis access token for the authorized GitHub account in travis profile.
- Generate Codacy access token for the authorized GitHub account codacy account settings.
Once you've collected all required access tokens then configure several build environment variables.
Variable | Description |
---|---|
GITHUB_USER1_NAME | First account github nickname. |
GITHUB_USER1_TOKEN | First account github access token. |
TRAVIS_USER1_TOKEN | First account travis access token. |
CODACY_USER1_TOKEN | First account codacy access token. |
GITHUB_USER2_TOKEN | Second account github access token. |
GITHUB_USER3_TOKEN | Third account github access token. |
Once the environment is set then the Flaxo project can be built using packaged gradle build tool.
./gradlew build
Running
After the Flaxo application has been built then you can launch the Flaxo instance locally. Flaxo launching requires a specific environment to be configured.
To run Flaxo instance locally you should do the following:
- Create Github OAuth App in github developer settings.
- Retrieve Moss user id using mailing registration.
- Install node.js and npm.
- Install ruby and travis cli client.
- Install python 3.
- Configure environment variables described in configuration section of deploy documentation.
Once the environment is set then the Flaxo services can be launched one by one.
At first, start the database container.
docker run -p 5432:5432 postgres:11.1
Boot up backend using packaged gradle build tool.
./gradlew bootRun
And finally boot up frontend at http://localhost:8000.
./gradlew runFrontend