diff --git a/.vscode/settings.json b/.vscode/settings.json index 69c1e77..d128ba4 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,9 +1,10 @@ { - "sarif-viewer.connectToGithubCodeScanning": "off", - "codeQL.githubDatabase.update": "never", - "yaml.schemas": { - "https://goreleaser.com/static/schema-pro.json": ".goreleaser.yml", - "file:///Users/rparman/.vscode/extensions/atlassian.atlascode-3.0.10/resources/schemas/pipelines-schema.json": "bitbucket-pipelines.yml", - "https://json.schemastore.org/github-issue-config.json": "file:///Library/WebServer/Documents/northwood-labs/devsec-tools/.github/ISSUE_TEMPLATE/config.yml" - } + "sarif-viewer.connectToGithubCodeScanning": "off", + "codeQL.githubDatabase.update": "never", + "yaml.schemas": { + "https://goreleaser.com/static/schema-pro.json": ".goreleaser.yml", + "file:///Users/rparman/.vscode/extensions/atlassian.atlascode-3.0.10/resources/schemas/pipelines-schema.json": "bitbucket-pipelines.yml", + "https://json.schemastore.org/github-issue-config.json": "file:///Library/WebServer/Documents/northwood-labs/devsec-tools/.github/ISSUE_TEMPLATE/config.yml", + "https://json.schemastore.org/traefik-v3.json": "traefik.yml" + } } diff --git a/localdev/compose.yml b/localdev/compose.yml index 5bf3d88..374fd0f 100644 --- a/localdev/compose.yml +++ b/localdev/compose.yml @@ -81,11 +81,15 @@ services: # Enables the web UI and tells Traefik to listen to Docker command: - - "--log.level=DEBUG" + # - "--log.level=DEBUG" + - "--api=true" + - "--api.dashboard=true" - "--api.insecure=true" - "--entryPoints.web.address=:80" - "--providers.docker.exposedbydefault=false" - "--providers.docker=true" + - "--providers.file.filename=/traefik.yml" + - "--providers.file.watch=true" # Set shared memory limit when using `docker compose`. shm_size: 512mb @@ -103,6 +107,7 @@ services: volumes: # So that Traefik can listen to the Docker events - "/var/run/docker.sock:/var/run/docker.sock:ro" + - "./traefik.yml/:/traefik.yml" ports: - 80:80 # Have Traefik run on port 80; distinguish by /etc/hosts definitions diff --git a/localdev/traefik.yml b/localdev/traefik.yml new file mode 100644 index 0000000..17c8f95 --- /dev/null +++ b/localdev/traefik.yml @@ -0,0 +1,12 @@ +--- +http: + routers: + apiproxy: + rule: Host(`api.devsec.local`) + service: apiproxy + + services: + apiproxy: + loadBalancer: + servers: + - url: http://localhost:8080