Catalyst / admin/Synapse-Sonar 14.8 GB / 57.8 GB 40.0 GB free
Help Sign in

admin / Synapse-Sonar

public

Attack Surface Simulation

Code Issues Pull requests Pipelines Packages Security Insights Wiki Settings
Synapse-Sonar / synapse-sonar / docker-compose.yml 1704 B · main
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Synapse Sonar — local / self-hosted orchestration
# Usage:  cp .env.example .env  &&  docker compose up -d --build
services:
  db:
    image: postgres:16-alpine
    container_name: sonar-db
    restart: unless-stopped
    environment:
      POSTGRES_USER: ${POSTGRES_USER:-sonar}
      POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-sonar_dev_password}
      POSTGRES_DB: ${POSTGRES_DB:-synapse_sonar}
    volumes:
      - sonar-db-data:/var/lib/postgresql/data
    networks:
      - sonar-net
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-sonar} -d ${POSTGRES_DB:-synapse_sonar}"]
      interval: 5s
      timeout: 5s
      retries: 10
    # Not published to the host by default — only the app reaches it over sonar-net.
    # Uncomment to inspect with a local client:
    # ports:
    #   - "5432:5432"

  app:
    build:
      context: .
      dockerfile: Dockerfile
    container_name: sonar-app
    restart: unless-stopped
    depends_on:
      db:
        condition: service_healthy
    environment:
      # Compose-internal DSN — host is the service name `db`
      DATABASE_URL: postgresql://${POSTGRES_USER:-sonar}:${POSTGRES_PASSWORD:-sonar_dev_password}@db:5432/${POSTGRES_DB:-synapse_sonar}?schema=public
      NEXTAUTH_URL: ${NEXTAUTH_URL:-http://localhost:3000}
      NEXTAUTH_SECRET: ${NEXTAUTH_SECRET:?set NEXTAUTH_SECRET in .env}
      # 32-byte (64 hex char) key used to AES-256-GCM encrypt integration secrets at rest
      INTEGRATION_ENCRYPTION_KEY: ${INTEGRATION_ENCRYPTION_KEY:?set INTEGRATION_ENCRYPTION_KEY in .env}
    ports:
      - "3000:3000"
    networks:
      - sonar-net

networks:
  sonar-net:
    driver: bridge

volumes:
  sonar-db-data: