Skip to content

studyhub-co/docker-run-aws-elastic-beanstalk

Repository files navigation

Docker-run AWS deploy scripts.

This project include AWS elastic beanstalk docker deploy files for docker-run service.

The service based on glot.io code.

Overview

┌────────────────────────────────────────────┐
│       Studyhub http client                 │
└────────────────────────────────────────────┘
          │                         │
          │                         │
          ▼                         ▼
┌──────────────────┐   ┌─────────────────────┐
│ save             │   │                     │
│ create-react-app │   │                     │
│ build from ->    │   │ docker-run docker   │
└──────────────────┘   └─────────────────────┘
                                    │
                                    │
                                    ▼
                       ┌─────────────────────────┐
                       │         docker          │
                       │  ┌───────────────────┐  │
                       │  │    glot-images    │  │
                       │  │  ┌─────────────┐  │  │
                       │  │  │ code-runner │  │  │
                       │  │  └─────────────┘  │  │
                       │  └───────────────────┘  │
                       └─────────────────────────┘

Process steps

Studyhub side

  1. We have a 'celery' queue with a task build 'create react app'. Building process (webpack build) takes too many system resources, so we need to use queue to limit building proccess to one at the same period of time.
  2. User runs command 'publish sandbox' from VSCode editor.
  3. Task created and added to the celery queue.
  4. Tasks broker (rabbitmq) run 'publish sandbox' task.
  5. Task makes an HTTP request to the 'docker-run' web service with JSON data of sandbox files.

Docker-run side

  1. docker-run service starts container with docker image 'create-react-app' (glot-image).
  2. glot-image run code-runner with build commands
  3. run command creates archive with build files result and return with HTTP response to Studyhub

Studyhub side

  1. Task get result of docker-run response and save static files in the Django media folder.
  2. Application serves with nginx as static files to exclude server-side application compromising.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages