A web application to centralize the related tools of your projects, a 21th century links management with security and data collection. More technical details can be found in the subdirectories ligo-api and ligo-ui.
Cross-browser Testing Platform and Open Source <3 Provided by Sauce Labs
curl https://raw.githubusercontent.com/ligoj/ligoj/master/docker-compose.yml -o docker-compose.yml -s && docker-compose up
Open your browser at : Ligoj Home
User/password for administrator role : ligoj-admin
and ligoj-user
for a regular user
You can install the plug-ins for RBAC security : plugin-id,plugin-id-ldap,plugin-id-ldap-embedded
See Wiki page
See each container ligo-api and ligo-ui.
Docker, compose and git install, then build, then run.
sudo yum install -y docker git
sudo pip3 install docker-compose
sudo usermod -a -G docker ec2-user
sudo systemctl enable docker.service
sudo systemctl start docker.service
git clone https://github.com/ligoj/ligoj.git
cd ligoj
mkdir -p "$(pwd)/.ligoj"
echo "LIGOJ_HOME=$(pwd)/.ligoj
PODMAN_USERNS=keep-id" > .env
docker-compose -p ligoj up -d --build
open http:https://localhost:8080/ligoj
AWS_ACCOUNT="$(aws sts get-caller-identity --query "Account" --output text)"
AWS_REGION="$(curl -s http:https://169.254.169.254/latest/meta-data/placement/availability-zone | sed 's/\(.*\)[a-z]/\1/')"
ECR_REGISTRY=$AWS_ACCOUNT.dkr.ecr.$AWS_REGION.amazonaws.com
docker image tag ligoj/ligoj-api:3.3.0 $ECR_REGISTRY/ligoj/ligoj-api:3.3.0
docker image tag ligoj/ligoj-ui:3.3.0 $ECR_REGISTRY/ligoj/ligoj-ui:3.3.0
aws ecr get-login-password --region $AWS_REGION | docker login --username AWS --password-stdin $ECR_REGISTRY
docker push $ECR_REGISTRY/ligoj/ligoj-api:3.3.0
docker push $ECR_REGISTRY/ligoj/ligoj-ui:3.3.0
Variable | Service | Phase | Default | Note |
---|---|---|---|---|
LIGOJ_HOME | api | RUN | /home/ligoj |
To map a persistent home |
LIGOJ_REGISTRY | * | BUILD | To push to your registry. When provided, must ends with / . |
|
LIGOJ_VERSION | app-* | BUILD | (version of application) | |
LIGOJ_WEB_PORT | web | RUN | 8080 |
Internal WEB port |
LIGOJ_PORT | web | RUN | 8080 |
Exposed port |
LIGOJ_API_JAVA_OPTIONS | api | RUN | -Duser.timezone=UTC |
|
LIGOJ_WEB_JAVA_OPTIONS | web | RUN | -Duser.timezone=UTC -Dsecurity=Rest |
|
LIGOJ_API_CRYPTO | api | RUN | -Dapp.crypto.password=public |
Double encryption feature, see core-context-common.xml |
LIGOJ_WEB_CRYPTO | web | RUN | -Dapp.crypto.password=public |
Double encryption feature, see core-context-common.xml |
LIGOJ_API_CUSTOM_OPTS | api | RUN | `` | Additional Java properties LIGOJ_API_JAVA_OPTIONS |
LIGOJ_WEB_CUSTOM_OPTS | web | RUN | `` | Additional Java properties, merged with LIGOJ_WEB_JAVA_OPTIONS |
LIGOJ_BUILD_PLATFORM | app-* | BUILD | linux/amd64 |
Docker build platform. |
LIGOJ_TARGET_PLATFORM | app-* | BUILD | linux/amd64 |
Docker run platform. |
Sample .env
file:
LIGOJ_HOME=/var/data/ligoj
PODMAN_USERNS=keep-id
LIGOJ_BUILD_PLATFORM=linux/arm64
LIGOJ_TARGET_PLATFORM=linux/arm64
LIGOJ_REGISTRY=nexus.sample.local/
LIGOJ_API_PREPARE_BUILD='export HTTP_PROXY=192.168.0.254:8000 && export HTTPS_PROXY=192.168.0.254:8000'
Source | Service | Destination | Phase | Note |
---|---|---|---|---|
prepare-build.sh |
app-* | WORKDIR |
BUILD | Additional Bash commands executed inside the builder , before mvn but after MAVEN_OPTS is set. |
prepare-run.sh |
app-* | WORKDIR |
RUN | Additional Bash commands executed inside the final image, before java |
settings.xml |
app-* | /root/.m2/ |
BUILD | Custom Maven configuration: proxy, mirror,... |
Sample prepare-build.sh
file:
export http_proxy=192.168.0.254:8000
export https_proxy=192.168.0.254:8000
By default, with Docker compose, the home is persistent it contains:
- plugins installation
- logs of containers
- database data
mkdir -p "$(pwd)/.ligoj"
echo "LIGOJ_HOME=$(pwd)/.ligoj
PODMAN_USERNS=keep-id" > .env
By default, the Docker compose overrides is loaded from compose.override.yml
and contains MySQL configuration.
For MySQL, the docker-compose command is:
export BUILDAH_FORMAT=docker
podman-compose -p ligoj build
podman-compose -p ligoj -f compose.yml -f compose.override.yml up -d
podman-compose -p ligoj down
For PostgreSQL, the docker-compose command is:
export BUILDAH_FORMAT=docker
podman-compose -p ligoj build
podman-compose -p ligoj -f compose.yml -f compose-postgres.yml up -d
podman-compose -p ligoj -f compose.yml -f compose-postgres.yml down
API is only available from a valid session.
UI page: Swagger UI
curl 'http:https://localhost:8080/ligoj/rest/openapi.json' -H '**cookies, jwt,...***'
Sample result
{
"openapi": "3.0.1",
"servers": [
{
"url": "http:https://localhost:8081/ligoj-api/rest"
}
],
"paths": {
"/service/id/company": {
"get": {
"operationId": "findAll_20",
"responses": {
"default": {
"description": "default response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TableItemContainerCountVo"
}
}
}
}
}
}
}
}
}
WADL format currently output only XML format.
curl 'http:https://localhost:8080/ligoj/rest?_wadl' -H '**cookies, jwt,...***'
Sample result
<application xmlns="http:https://wadl.dev.java.net/2009/02">
<resources base="http:https://localhost:8081/ligoj-api/rest/">
<resource path="/security">
<resource path="/login">
<method name="POST">
<request>
<representation mediaType="application/json" />
</request>
<response>
<representation mediaType="application/json" />
</response>
</method>
</resource>
</resource>
</resources>
</application>