CodeTheChangeUBC/reBOOT

View on GitHub
.devcontainer/devcontainer.json

Summary

Maintainability
Test Coverage
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/python
{
  "name": "reBOOT",
  // Use a custom Dockerfile. More info: https://containers.dev/guide/dockerfile
  "build": {
    "dockerfile": "Dockerfile"
  },

  // Features to add to the dev container. More info: https://containers.dev/features.
  "features": {
    "ghcr.io/devcontainers-contrib/features/postgres-asdf:1": {
      "version": "14.10"
    },
    "ghcr.io/itsmechlark/features/redis-server:1": {
      "version": "7"
    }
  },

  // Use portAttributes to map port numbers to default attributes.
  "portsAttributes": {
    "5432": {
      "label": "Database",
      "onAutoForward": "ignore"
    },
    "8000": {
      "label": "Server",
      "onAutoForward": "notify"
    }
  },

  "postStartCommand": "make codespace",

  // Configure tool-specific properties.
  "customizations": {
    "vscode": {
      "extensions": [
        "eamodio.gitlens",
        "ms-python.python",
        "ms-python.autopep8",
        "charliermarsh.ruff",
        "ms-azuretools.vscode-docker",
        "ms-vscode.makefile-tools",
        "github.vscode-github-actions"
      ],
      "settings": {
        "python.venvPath": "${workspaceFolder}"
      }
    }
  },
  "containerEnv": {
    "DJANGO_SETTINGS_MODULE": "reboot.settings"
  }

  // Connect as root. More info: https://aka.ms/dev-containers-non-root.
  // "remoteUser": "root"
}