cms
dockerized
services:
db
and cms_dev
.
Build and run:
foo@cms-test$ cd cms-dev/
foo@cms-dev$ docker compose -f docker-compose.yml up --build
(This should show the logs for the database)
In another terminal, run:
foo@cms-dev$ docker compose exec cms_dev bash
Now this should start an interactive shell for cms.
Config file used is config/cms.conf.docker.sample
to set the right host and port to connect to the database (db:5432
). The user is set to cmsuser:cmsuser.
Run the script to check environment for isolate (used for sandboxes):
cmsuser@~/cms$ ./isolate-check-environment
The first 4 tests are enough to pass for isolate to work properly (to use --cg - See documentation
If they don't pass, you should set the kernel parameters from cmdline.txt
on your host machine.
You can't set them with sysctl. Edit /etc/default/grub
by adding the line from cmdline.txt
.
Then run:
foo@/$ sudo update-grub
foo@/$ sudo reboot
Run the following commands to create a new user & database:
(if you don't want to modify cms.conf, let password be cmsuser)
cmsuser@~/cms$ createuser -h db -p 5432 --username=postgres --pwprompt cmsuser
cmsuser@~/cms$ createdb -h db -p 5432 --username=postgres --owner=cmsuser cmsdb
Grant permissions to user:
cmsuser@~/cms$ psql -h db -p 5432 --username=postgres --dbname=cmsdb --command='ALTER SCHEMA public OWNER TO cmsuser'
cmsuser@~/cms$ psql -h db -p 5432 --username=postgres --dbname=cmsdb --command='GRANT SELECT ON pg_largeobject TO cmsuser'
Create the database schema for CMS:
cmsuser@~/cms$ cmsInitDB
Create your admin account:
cmsuser@~/cms$ cmsAddAdmin your_username -p your_password
To see logs of all the services running:
cmsuser@~/cms$ cmsLogService 0
Start all services:
cmsuser@~/cms$ cmsResourceService -a
In your web browser, navigate to http://localhost:8889 and enter your admin credentials.
After configuring a contest, you can manually add a user by using the web interface.
They can log in with their credentials at: http://localhost:8888.
I cloned an example for the italian import format (in con_test-master
). The loader was pre-installed in cms.
To see more about configuration of a contest for this filesystem, see the doc.
To start a contest, go to con_test-master
and run:
cmsuser@~/cms/con_test-master$ cmsImportUser --all -L italy_yaml .
cmsuser@~/cms/con_test-master$ cmsImportContest -i -L italy_yaml