Skip to content

Commit

Permalink
Layered services images
Browse files Browse the repository at this point in the history
  • Loading branch information
nrybowski committed Oct 21, 2022
1 parent c5f0072 commit fe246b2
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 33 deletions.
13 changes: 0 additions & 13 deletions backend.containerfile

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
FROM ubuntu:22.04
FROM inginious/inginious-base

RUN apt-get update && apt-get -y install python3 python3-pip

WORKDIR /inginious
COPY inginious/common/ inginious/common/
COPY inginious/agent/__init__.py inginious/agent/
COPY inginious/agent/docker_agent/ inginious/agent/docker_agent/
COPY inginious-agent-docker .

COPY agent-docker.setup setup.py
COPY deploy/agent-docker.setup setup.py
RUN pip3 install .


CMD ["sh", "-c", "python3 inginious-agent-docker ${BACKEND}"]
File renamed without changes.
9 changes: 2 additions & 7 deletions agent-mcq.containerfile → deploy/agent-mcq.containerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
FROM ubuntu:22.04
FROM inginious/inginious-base

RUN apt-get update && apt-get -y install python3 python3-pip

WORKDIR /inginious
COPY inginious/common/ inginious/common/
COPY inginious/__init__.py inginious/
COPY inginious/agent/__init__.py inginious/agent/
COPY inginious/agent/mcq_agent/ inginious/agent/mcq_agent/
COPY inginious-agent-mcq .

COPY agent-mcq.setup setup.py
COPY deploy/agent-mcq.setup setup.py
RUN pip3 install .

CMD ["sh", "-c", "python3 inginious-agent-mcq ${BACKEND}"]
File renamed without changes.
9 changes: 9 additions & 0 deletions deploy/backend.containerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM inginious/inginious-base

COPY inginious/backend/ inginious/backend/
COPY inginious-backend .

COPY deploy/backend.setup setup.py
RUN pip3 install .

CMD ["sh", "-c", "python3 inginious-backend ${AGENT} ${CLIENT}"]
File renamed without changes.
7 changes: 7 additions & 0 deletions deploy/inginious-base.containerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM ubuntu:22.04

RUN apt-get update && apt-get -y install python3 python3-pip

WORKDIR /inginious
COPY inginious/common/ inginious/common/
COPY inginious/__init__.py inginious/
12 changes: 6 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@ services:
- inginious

inginious-backend:
image: inginious-backend
image: inginious/inginious-backend
build:
dockerfile: backend.containerfile
dockerfile: deploy/backend.containerfile
environment:
AGENT: "tcp://0.0.0.0:2001"
CLIENT: "tcp://0.0.0.0:2000"
networks:
- inginious

inginious-agent-docker:
image: inginious-agent-docker
image: inginious/inginious-agent-docker
depends_on:
- inginious-backend
deploy:
replicas: 1
build:
dockerfile: agent-docker.containerfile
dockerfile: deploy/agent-docker.containerfile
environment:
BACKEND: "tcp://inginious-backend:2001"
volumes:
Expand All @@ -31,13 +31,13 @@ services:
- inginious

inginious-agent-mcq:
image: inginious-agent-mcq
image: inginious/inginious-agent-mcq
depends_on:
- inginious-backend
deploy:
replicas: 1
build:
dockerfile: agent-mcq.containerfile
dockerfile: deploy/agent-mcq.containerfile
environment:
BACKEND: "tcp://inginious-backend:2001"
networks:
Expand Down

0 comments on commit fe246b2

Please sign in to comment.