From 1e896440824d2b4e4026a3ed84ab1e64fbda5757 Mon Sep 17 00:00:00 2001 From: Jinyoung Park Date: Wed, 20 Mar 2024 20:56:55 +0000 Subject: [PATCH] Add docker files --- docker/Dockerfile | 12 +++++++ docker/build.sh | 1 + docker/docker-compose.yml | 67 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 80 insertions(+) create mode 100644 docker/Dockerfile create mode 100644 docker/build.sh create mode 100644 docker/docker-compose.yml diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 000000000..eda44593a --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,12 @@ +FROM ubuntu:22.04 +ENV DEBIAN_FRONTEND noninteractive + +RUN apt-get update && \ + apt-get install -y --no-install-recommends \ + git gcc tidy python3 python3-pip python3-dev libzmq3-dev curl gnupg \ + libxmlsec1-dev libltdl-dev \ + pkg-config && \ + apt-get clean + +#WORKDIR /inginious +RUN pip3 install --no-cache-dir git+https://github.com/jyounggo/INGInious.git@v0.8.7#egg=INGInious[uwsgi,saml2] diff --git a/docker/build.sh b/docker/build.sh new file mode 100644 index 000000000..4cab72bb7 --- /dev/null +++ b/docker/build.sh @@ -0,0 +1 @@ +docker build -t csr.csel.io/inginious/inginious:v0.8.7 . diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml new file mode 100644 index 000000000..8b79583ae --- /dev/null +++ b/docker/docker-compose.yml @@ -0,0 +1,67 @@ +services: + db: + image: mongo:6.0.2 + networks: + - inginious + backend: + image: ${REGISTRY}/inginious/core-backend:${VERSION} + environment: + AGENT: "tcp://0.0.0.0:2001" + CLIENT: "tcp://0.0.0.0:2000" + networks: + - inginious + + agent-docker: + image: ${REGISTRY}/inginious/core-agent_docker:${VERSION} + depends_on: + - backend + deploy: + replicas: 1 + environment: + BACKEND: "tcp://backend:2001" + volumes: + - /var/run/docker.sock:/var/run/docker.sock + # See https://github.com/UCL-INGI/INGInious/issues/352 + - ./tasks/:/inginious/tasks + - ./backups/:/inginious/backups + # See https://github.com/UCL-INGI/INGInious/issues/799 + - /tmp/agent_data/:/tmp/agent_data/ + networks: + - inginious + + agent-mcq: + image: ${REGISTRY}/inginious/core-agent_mcq:${VERSION} + depends_on: + - backend + deploy: + replicas: 1 + environment: + BACKEND: "tcp://backend:2001" + volumes: + # See https://github.com/UCL-INGI/INGInious/issues/352 + - ./tasks/:/inginious/tasks + - ./backups/:/inginious/backups + # See https://github.com/UCL-INGI/INGInious/issues/799 + - /tmp/agent_data/:/tmp/agent_data/ + networks: + - inginious + + frontend: + image: ${REGISTRY}/inginious/core-frontend:${VERSION} + depends_on: + - backend + - agent-docker + - agent-mcq + environment: + - INGINIOUS_WEBAPP_HOST=0.0.0.0 + volumes: + - ./configuration.deploy.yaml:/inginious/configuration.yaml + - ./tasks/:/inginious/tasks + - ./backups/:/inginious/backups + ports: + - 9000:8080 + networks: + - inginious + +networks: + inginious: