Skip to content

Infrastructure for adaptive learning with surveys and experiments.

License

Notifications You must be signed in to change notification settings

dmolitor/adaptive-infra

Repository files navigation

adaptive-infra

Infrastructure for adaptive learning with surveys and experiments.

Requirements

For local development

Services

The application is comprised of the following services:

  • app: This service builds and hosts the front-end survey form using Shiny for Python. See /ui for corresponding code.

  • api: This service builds and hosts the API that handles all interactions between the survey form and the database on the backend using FastAPI. See /api for corresponding code.

  • database: This service utilizes the official PostgreSQL Docker image to store all relevant data and user responses.

Running locally

To run the services locally:

docker compose up -d

To run using Compose Watch:

docker compose watch

To shut everything down:

docker compose down

Build/Deploy

This project uses just to organize building/deployment commands. To see all available recipes run just in the root directory.

>> just
just --list
Available recipes:
    aws-ami-build         # Build AWS EC2 AMI with HCL Packer
    aws-security-group    # Provision an AWS security group
    aws-sso-configure     # Configure AWS SSO
    aws-sso-login profile="default" # AWS SSO login
    aws-swarm-launch      # Launch a Docker Swarm on an AWS EC2 server
    aws-swarm-terminate   # Terminate any active Docker Swarm AWS server
    aws-volume            # Provision an AWS EBS volume
    check-aws             # Check if AWS CLI is installed
    check-dependencies    # Check all deploy dependencies
    check-docker          # Check if Docker is installed
    check-just            # Check if just is installed
    check-packer          # Check if HCL Packer is installed
    check-python          # Check if Python is installed
    default               # List all available recipes
    deploy                # Deploy the application to an AWS-hosted server
    docker-build-and-push # Build the app and api Docker images
    terminate             # Terminate the running application and corresponding AWS server.
    venv                  # Activate virtual environment and install Python dependencies
To execute a recipe: just [recipe-name]

Build Docker images

To build the base Docker images and push them to DockerHub:

just docker-build-and-push

Adaptive experiment

To deploy the adaptive experiment to an AWS server:

just deploy

To terminate the running AWS server:

just terminate

About

Infrastructure for adaptive learning with surveys and experiments.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published