codebox

command module
v0.0.35 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 15, 2025 License: MIT Imports: 8 Imported by: 0

README

Remote Development Environments

Docker image size Docker image size

[!WARNING]
This software is still an alpha version, it has many bugs.

Codebox is a service that allows developers to create remote workspaces. The structure of Codebox workspaces can be defined using standard spefications such as docker-compose, devcontainer, etc...

Quickstart

The easiest way to deploy your Codebox instance is using docker compose provided in this repository.

version: '3'

services:
  redis:
    image: redis:7.4.1
    restart: always

  db:
    image: mysql:8.0.41
    environment:
      MYSQL_ROOT_PASSWORD: ${CODEBOX_DB_ROOT_PASSWORD:-password}
      MYSQL_DATABASE: ${CODEBOX_DB_NAME:-codebox}
      MYSQL_USER: ${CODEBOX_DB_USER:-codebox}
      MYSQL_PASSWORD: ${CODEBOX_DB_PASSWORD:-password}
    healthcheck:
      test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
      timeout: 20s
      retries: 10
    volumes:
      - codeboxdb:/var/lib/mysql
    restart: always

  codebox:
    image: dadebia/codebox:${CODEBOX_VERSION:-latest}
    depends_on:
      db:
        condition: service_healthy
    ports:
      - ${CODEBOX_PORT:-12800}:8000
    volumes:
      - codeboxdata:/codebox/data
      - /var/run/docker.sock:/var/run/docker.sock
    environment:
      - CODEBOX_EXTERNAL_URL=${CODEBOX_EXTERNAL_URL:-https://codebox.example.com}
      - CODEBOX_WILDCARD_DOMAIN=${CODEBOX_WILDCARD_DOMAIN:-codebox.example.com}
      - CODEBOX_USE_GRAVATAR=true
      - CODEBOX_USE_SUBDOMAINS=true
      - CODEBOX_DB_NAME=${CODEBOX_DB_NAME:-codebox}
      - CODEBOX_DB_USER=${CODEBOX_DB_USER:-codebox}
      - CODEBOX_DB_PASSWORD=${CODEBOX_DB_PASSWORD:-password}
    restart: always

volumes:
  codeboxdb:
  codeboxdata:

Runners

Codebox cannot run workspaces by itself, you need to connect runners.

Codebox runners are services connected to the Codebox instance, they create and manage your workspaces. Each workspace type has its own runner.

Only a runner for docker-based workspaces is currently available, this runner can create workspaces using based ondocker compose or devcontainer. The source code and a guide for this runner are available here.

Connect to workspace container

You can connect to a running workspace container using codebox-cli. Use official VS Code Extension to open any workspace in VS Code with a single click.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
api
cli
db
Package docs Code generated by swaggo/swag.
Package docs Code generated by swaggo/swag.
utils

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL