...
If the containers turn off immediately after being started, it is probable that something is corrupted. The most common corruption causes are: loss of database integrity, and corruption of the container’s metadata files, both caused because of an improper and sudden shutdown of the system. Use the command below to see the Docker container logs and further diagnose the issue.
Code Block docker logs <container-id>
However, no matter the root cause of the issue, if something is not working as expected, re-creating the Docker containers can quickly solve the problems.
...
Containers are individual spaces where the applications runsrun; however, the important data is stored in the volumes, so the containers can easily be deleted and re-created without having to restore backups as long as the volume folders are still there.
Start by deleting the Docker containers. Make sure the containers are stopped first.
Code Block docker stop <container-id> #stops a running container docker rm <container-id> #deletes a container
Navigate to the /opt folder and look for a file named docker-compose.yml. This file has all the instructions to recreate the containers and connect the existing volumes.
Code Block cd /opt/moodle #compose file location on the elearning server
To execute the docker compose file, run the following command while on the same path as the .yml file
Code Block docker compose up -d
(Analytics machine only) For the analytics machine, it is necessary to execute an additional command before and after restoring the containers.
Code Block export TAG=4.0.2 #superset version docker compose -f docker-compose-image-tag.yml up -d docker network connect superset_default superset_app #connect to superset network