# Dockerizing D4SCIENCE ## subprojects: * [cassandra](./cassandra/README.md) * [socialservice](./socialservice/README.md) the first time you check-out a repo you need to use --init `git submodule update --init --recursive` the other times `git pull --recurse-submodules` ### cassandra [cassandra](./cassandra/README.md) is the dockerization of the cassandra infrastructure it contains the script for dumping the devel environment, and the [Dockerfile](./cassandra/Dockerfile) and [Docker compose](./cassandra/compose.yaml) files to build and start the composed instance with the dumped schema and data ### socialservice [socialservice](./socialservice/README.md) is the dockerization of the socialservice infrastructure it contains the script for dumping the devel environment, and the [Dockerfile](./socialservice/Dockerfile) and [Docker compose](./socialservice/compose.yaml) files to build and start the composed instance with the dumped schema and data ## DOCKER instructions you can start the 2 services individually entering in the folder and starting the docker compose instance, or start the common compose in the base folder. start common composer: `docker compose up --build` force recreate docker image `docker compose build --no-cache` check status: `docker exec -it cassandra1 nodetool status` `docker exec -it cassandra2 nodetool status` `docker exec -it cassandra3 nodetool status` `docker exec -it social nodetool status` ## LIFERAY aggiunto a /etc/host l'entry: 127.0.0.1 keycloak 127.0.0.1 liferay keycloak server: http://keycloak:9999 liferay server: * http://liferay:80 * http://next.dev.d4science.org:80 start composer: `docker compose up --build` check keycloak status: * postgres: `docker inspect --format='{{json .State.Health}}' lr_docker-postgres-1` * keycloak: `docker inspect --format='{{json .State.Health}}' lr_docker-keycloak-1` * liferay: `docker inspect --format='{{json .State.Health}}' lr_docker-liferay-1` run a single service: * postgres: `docker compose up postgres --build` * keycloak: `docker compose up keycloak --build` * liferay: `docker compose up liferay --build` open bash on server * postgres: `docker exec -it lr_docker-postgres-1 /bin/sh` * keycloak: `docker exec -it lr_docker-keycloak-1 /bin/sh` * liferay: `docker exec -it lr_docker-liferay-1 /bin/sh` check db connection: docker exec -it lr_docker-liferay-1 bash -c 'PGPASSWORD=pass_db psql -h lr_docker-postgres-1 -U infra_bundle_dev -d liferay_db'