CodeThreat - Knowledge Center
CodeThreatGithub
  • Latest
    • v2409 Cloud Upgrades, Repo Monitoring, Path Exclusion, and New JS/TS Rulesets
  • Product Updates
    • v2402 GenAI, Sarif and New Language Supports
    • v2401 SCA Release
    • v2311.30
    • v2310.29
    • v2309.30
    • v2308.30
    • v2307.25
    • v2306.26
    • v2305.26
    • v2304.23
  • Privacy Policy
  • Terms of Service
  • Company Handbook
  • Usage Guide
    • API Documentation
    • CT Server Installation
      • Deploy with Docker
      • Self-Hosted Server Setup
      • Installation
    • Introducing CodeThreat
    • Create a CodeThreat Account
    • Quick Start & Scan
    • HomePage
    • Projects
      • Overview
      • Scans
      • SCA(Software Composition Analysis)
      • Licences
      • Dependency Tree
      • Project Structure
      • Report
    • Issues
      • Issue List
      • Issue List Filter
      • Issue Detail
    • Integrations
      • Azure
      • Github
      • Gitlab
      • Jira
    • CI-CD Integrations
      • GitHub Actions
      • Jenkins
      • Gitlab
      • Bamboo
      • Azure
    • Notifications
    • Settings
      • General
      • SMTP
      • License
      • OAUTH Apps
        • Azure
        • Github
        • GitLab
      • Organizations
      • Scan Policy
      • Users & Groups
      • Notifications
      • Access Token
Powered by GitBook
On this page
  • Access to CodeThreat Container Registry
  • Step 1: Create the Docker Compose File
  • Step 2: Start the Containers

Was this helpful?

  1. Usage Guide
  2. CT Server Installation

Deploy with Docker

This guide provides a step-by-step walkthrough for deploying the CodeThreat ASP with MongoDB using Docker Compose.

Access to CodeThreat Container Registry

The CodeThreat container registry is private and accessible only upon request. To deploy CodeThreat ASP, you’ll need an access token and login credentials, which will be provided to you by the CodeThreat team.

Once you receive your credentials, follow these steps to log in to our container registry:

docker login codethreatcontainer.azurecr.io

Enter the provided username and access token when prompted. This will grant you access to download the CodeThreat ASP Docker images.

Step 1: Create the Docker Compose File

Create a file named docker-compose.yaml in your deployment directory and add the following content:

version: "3"

services:
  codethreat_asp:
    image: codethreatcontainer.azurecr.io/codethreatsast-server-selfhosted:2411.07.1-master
    restart: on-failure
    ports:
      - "8081:8081" # Expose the application on port 8081
    depends_on:
      - mongodb
    volumes:
      - ./ctdata:/app/ctdata
    environment:
      HOSTNAME: "0.0.0.0"
      PORT: "8081"
      MONGO_URL: "mongodb://mongodb:27017"
      # Uncomment and configure SSL settings if needed
      # SECURE_PORT: "443"
      # CERTIFICATE_KEY_PATH: "/path/to/key.key"
      # CRT_PATH: "/path/to/cert.crt"

  mongodb:
    image: mongo
    restart: always
    volumes:
      - ./mongodb/data:/data/db

Step 2: Start the Containers

Run the following command to start the services in detached mode:

docker-compose up -d
PreviousCT Server InstallationNextSelf-Hosted Server Setup

Last updated 6 months ago

Was this helpful?