Docker Deployment
Docker Compose
Section titled “Docker Compose”The easiest way to run Scoold locally is with Docker Compose:
docker compose -f https://github.com/Erudika/scoold.git upManual setup
Section titled “Manual setup”Alternatively, if the command above fails, here are the steps to manually compose the stack from scratch:
- Copy the
docker-compose.ymlfile locally:docker-compose.ymlfor Scoolddocker-compose.yml services:para:image: erudikaltd/para:latest_stableports:- "8080:8080"volumes:- type: volumesource: paraDatatarget: /para/data- type: volumesource: paraLibtarget: /para/lib- type: bindsource: ./para-application.conftarget: /para/application.confrestart: alwaysenvironment:- JAVA_OPTS=-Dconfig.file=/para/application.conf -Dloader.path=/para/libscoold:depends_on:- paraimage: erudikaltd/scoold:latest_stableports:- "8000:8000"volumes:- type: bindsource: ./scoold-application.conftarget: /scoold/application.conf- type: bindsource: ./para-application.conftarget: /scoold/para-application.confrestart: alwaysenvironment:- JAVA_OPTS=-Dconfig.file=/scoold/application.conf -Dscoold.autoinit.para_config_file=/scoold/para-application.conf -Dscoold.para_endpoint=http://para:8080- BOOT_SLEEP=5volumes:paraData:paraLib:docker-compose.ymlfor Scoold Prodocker-compose.yml services:para:image: erudikaltd/para:latest_stableports:- "8080:8080"volumes:- type: volumesource: paraDatatarget: /para/data- type: volumesource: paraLibtarget: /para/lib- type: bindsource: ./para-application.conftarget: /para/application.confrestart: alwaysenvironment:- JAVA_OPTS=-Dconfig.file=/para/application.conf -Dloader.path=/para/libscoold:depends_on:- paraimage: 374874639893.dkr.ecr.eu-west-1.amazonaws.com/scoold-pro:latest_stableports:- "8000:8000"volumes:- type: volumesource: scooldUploadstarget: /scoold-pro/uploads- type: bindsource: ./scoold-application.conftarget: /scoold-pro/application.conf- type: bindsource: ./para-application.conftarget: /scoold-pro/para-application.confrestart: alwaysenvironment:- JAVA_OPTS=-Dconfig.file=/scoold-pro/application.conf -Dscoold.autoinit.para_config_file=/scoold-pro/para-application.conf -Dscoold.para_endpoint=http://para:8080- BOOT_SLEEP=5volumes:paraData:paraLib:scooldUploads: - Create two blank configuration files, for Scoold and Para, in the same directory:
Since the configuration files do not define
Terminal window touch para-application.conf scoold-application.confscoold.app_secret_keyandscoold.para_secret_key, these secrets will be populated automatically upon initialization. - In the same directory, execute this terminal command to start Scoold and Para:
Terminal window docker compose up
Finally, open localhost:8000/signin/register and create a new account. If you’ve configured your email with
scoold.admins = "email@domain.com" and you sign up with the same email, you will become admin automatically.
To stop the containers press Ctrl + C.
Standalone Docker container
Section titled “Standalone Docker container”If you prefer, you can run the Scoold container outside of Docker Compose.
First, have your Scoold scoold-application.conf configuration file ready in the current directory and run this command:
docker run -ti -p 8000:8000 --rm \ -v $(pwd)/scoold-application.conf:/scoold/application.conf \ -e JAVA_OPTS="-Dconfig.file=/scoold/application.conf" \ erudikaltd/scoold:latest_stableFor Scoold Pro the images are located in a private registry. You can get access to it once you purchase a Pro license. The run command for Scoold Pro is similar with the only difference being the uploads volume:
docker run -ti -p 8000:8000 --rm \ -v $(pwd)/scoold-application.conf:/scoold-pro/application.conf \ -v scoold-uploads:/scoold-pro/uploads \ -e JAVA_OPTS="-Dconfig.file=/scoold-pro/application.conf" \ 374874639893.dkr.ecr.eu-west-1.amazonaws.com/scoold-pro:latest_stableEnvironment variables
JAVA_OPTS- Java system properties, e.g.-Dscoold.port=8000BOOT_SLEEP- Startup delay, in seconds
Docker registry for Scoold Pro images
Section titled “Docker registry for Scoold Pro images”If you purchase Scoold Pro you can get access to the private Docker registry hosted on the AWS Elastic Container Registry. Access to the private registry is not given automatically upon purchase - you have to request it. You will then be issued a special access key and secret for AWS ECR. Then execute the following BASH commands (these require AWS CLI v2.x):
- Configure AWS CLI to use the new credentials or instruct AWS CLI to use an existing credentials profile, e.g.
export AWS_PROFILE=docker:Terminal window aws configure - Authenticate with our ECR registry - a temporary access token will be issued for 12h:
If the command above doesn’t succeed, you won’t be able to pull the latest Scoold Pro image or run
Terminal window aws ecr get-login-password --region eu-west-1 | \docker login --username AWS \--password-stdin 374874639893.dkr.ecr.eu-west-1.amazonaws.comdocker compose. - Pull a Scoold Pro image with a specific tag:
Terminal window aws ecr list-images --repository-name scoold-pro;docker pull 374874639893.dkr.ecr.eu-west-1.amazonaws.com/scoold-pro:latest_stable
Once you have access to Scoold Pro container images, you can bring up a Scoold Pro instance with Docker Compose as well:
docker compose -f https://github.com/Erudika/scoold-pro.git upThe :latest tag is not supported but you can use :latest_stable. The command aws get-login-password
gives you an access token to the private Docker registry which is valid for 12 hours.
In case you don’t want to use AWS CLI for logging into the Scoold Pro registry, install the AWS ECR Docker Credentials Helper.