-
Java 21 SDK
Firstly, create your own user network on Docker for the James environment:
$ docker network create --driver bridge james
Third party compulsory dependencies:
-
Cassandra 4.0
-
OpenSearch 2.1.0
-
RabbitMQ-Management 3.8.18
-
Zenko Cloudserver or AWS S3
$ docker run -d --network james -p 9042:9042 --name=cassandra cassandra:4.1.9
$ docker run -d --network james -p 9200:9200 --name=opensearch --env 'discovery.type=single-node' --env 'DISABLE_SECURITY_PLUGIN=true' --env 'DISABLE_INSTALL_DEMO_CONFIG=true' opensearchproject/opensearch:2.19.2
$ docker run -d --network james -p 5672:5672 -p 15672:15672 --name=rabbitmq rabbitmq:4.1.1-management
$ docker run -d --network james -p 8000:8000 --env 'REMOTE_MANAGEMENT_DISABLE=1' --env 'SCALITY_ACCESS_KEY_ID=accessKey1' --env 'SCALITY_SECRET_ACCESS_KEY=secretKey1' --name=s3 ghcr.io/scality/cloudserver:c1ba296859690c1cbbec609aaae430f6b04b4745To import the image locally:
docker image load -i target/jib-image.tarThen run it along with its dependency:
docker compose up -dUse the [JAVA_TOOL_OPTIONS environment option](https://github.com/GoogleContainerTools/jib/blob/master/docs/faq.md#jvm-flags) to pass extra JVM flags. For instance:
james:
...
environment:
- JAVA_TOOL_OPTIONS=-Xmx500m -Xms500m[Glowroot APM](https://glowroot.org/) is packaged as part of the docker distribution to easily enable valuable performances insights. Disabled by default, its java agent can easily be enabled:
james:
...
environment:
- JAVA_TOOL_OPTIONS=-javaagent:/root/glowroot.jarThe [CLI](https://james.apache.org/server/manage-cli.html) can easily be used:
docker exec CONTAINER-ID james-cli ListDomainsNote that you can create a domain via an environment variable. This domain will be created upon James start:
james:
...
environment:
- DOMAIN=domain.tldTo run james, you have to create a directory containing required configuration files.
James requires the configuration to be in a subfolder of working directory that is called conf. A [sample directory](https://github.com/apache/james-project/tree/master/server/apps/distributed-app/sample-configuration) is provided with some default values you may need to replace, especially compulsory third party software endpoints.
You will need to update its content to match your needs.
Once everything is set up, you just have to run the jar with:
$ java -Dworking.directory=. -Dlogback.configurationFile=conf/logback.xml -Djdk.tls.ephemeralDHKeySize=2048 -jar james-server-distributed-app.jar --generate-keystoreIn the case of quick start James without manually creating a keystore (e.g. for development), just input the command argument --generate-keystore when running,
James will auto-generate keystore file with the default setting that is declared in jmap.properties (tls.keystoreURL, tls.secret)
$ java -Dworking.directory=. -Dlogback.configurationFile=conf/logback.xml -Djdk.tls.ephemeralDHKeySize=2048 -jar james-server-distributed-app.jar --generate-keystoreNote that binding ports below 1024 requires administrative rights.