Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bring up local environment using docker compose #315

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,22 @@ Contributions of integrations with additional traffic sources are more than welc
```shell
kubectl delete pvc -l app.kubernetes.io/instance=apiclarity -n apiclarity
```
## Install using docker compose

```
docker-compose build
docker compose up
```

Bring up Clarity UI via

http://localhost:8080

You can now send telemetry events to

http://localhost:9000/api/telemetry

See (plugins/api/swagger.yaml)[https://github.com/openclarity/apiclarity/plugins/api/swagger.yaml] For documentation on how to send requests to this API

## Configurations

Expand Down
40 changes: 40 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
version: '2'

services:
apiclarity:
entrypoint: /app/backend run
build:
dockerfile: Dockerfile
ports:
- "8080:8080"
- "9000:9000"
environment:
- DB_PASS=mysecretpassword
- DB_USER=myuser
- DB_HOST=db
- DB_NAME=apidb
- DB_PORT_NUMBER=5432
- ENABLE_K8S=false
- ENABLE_DB_INFO_LOGS=false
- BACKEND_REST_PORT=8080
- HTTP_TRACES_PORT=9000
- TRACE_SAMPLING_ENABLED=false
- BFLA_AUTOMATIC_LEARNING_AND_DETECTION=true
- STATE_BACKUP_FILE_NAME=
- DEBUG=true
depends_on:
postgres:
condition: service_healthy
postgres:
image: postgres
hostname: db
restart: always
environment:
- POSTGRES_PASSWORD=mysecretpassword
- POSTGRES_USER=myuser
- POSTGRES_DB=apidb
healthcheck:
test: [ "CMD", "pg_isready", "-q", "-d", "apidb", "-U", "myuser" ]
interval: 2s
timeout: 5s
retries: 5