diff --git a/Justfile b/Justfile index 2bd3224..75acefe 100644 --- a/Justfile +++ b/Justfile @@ -6,22 +6,38 @@ lint: clean: docker compose -f docker-compose.base.yaml down -v -run target build="": +run target build="" profile="": #!/usr/bin/env bash + set -e + BUILD_FLAG="" - - if [ "{{build}}" == "build" ]; then + + if [ "{{build}}" = "build" ]; then BUILD_FLAG="--build" fi - if [ "{{target}}" == "prod" ]; then - docker compose -f docker-compose.base.yaml -f docker-compose.prod.yaml up $BUILD_FLAG + PROFILE_FLAG="" + + if [ "{{profile}}" = "observability" ]; then + PROFILE_FLAG="--profile observability" + fi + + if [ "{{target}}" = "prod" ]; then + docker compose \ + -f docker-compose.base.yaml \ + -f docker-compose.prod.yaml \ + $PROFILE_FLAG \ + up $BUILD_FLAG else - docker compose -f docker-compose.base.yaml -f docker-compose.dev.yaml up $BUILD_FLAG + docker compose \ + -f docker-compose.base.yaml \ + -f docker-compose.dev.yaml \ + $PROFILE_FLAG \ + up $BUILD_FLAG fi restart target: docker compose -f docker-compose.base.yaml restart {{target}} attach target: - docker compose -f docker-compose.base.yaml exec -it -t {{target}} /bin/bash \ No newline at end of file + docker compose -f docker-compose.base.yaml exec -it {{target}} /bin/bash \ No newline at end of file diff --git a/docker-compose.base.yaml b/docker-compose.base.yaml index 24872f0..f3654e2 100644 --- a/docker-compose.base.yaml +++ b/docker-compose.base.yaml @@ -31,6 +31,7 @@ services: grafana: image: grafana/grafana:12.1.1 + profiles: ["observability"] labels: - "traefik.enable=true" @@ -145,6 +146,7 @@ services: alloy: image: grafana/alloy:latest + profiles: ["observability"] volumes: - ./deploy/observability/grafana/config.alloy:/etc/alloy/config.alloy @@ -162,6 +164,7 @@ services: prometheus: image: prom/prometheus + profiles: ["observability"] command: - "--config.file=/etc/prometheus/prometheus.yml" @@ -178,6 +181,7 @@ services: tempo: image: grafana/tempo:latest + profiles: ["observability"] command: - "-target=all" diff --git a/example.config.toml b/example.config.toml index 56b03d8..636cf0f 100644 --- a/example.config.toml +++ b/example.config.toml @@ -3,10 +3,10 @@ host = "0.0.0.0" port = 8000 [database] -username = "postgres" -password = "admin_password" +database = "conode" +username = "conode" +password = "conodeSecretPassword" host = "persistence.literally.io" -database = "postgres" port = 5432 [secrets] @@ -17,5 +17,5 @@ issuer = "http://keycloak.conode.com/realms/conode" audience = "conode" [telemetry] -endpoint = "collector:4317" -enabled = true \ No newline at end of file +endpoint = "alloy:4317" +enabled = false \ No newline at end of file