Skip to content

Commit

Permalink
Feature/org docker compose (#35)
Browse files Browse the repository at this point in the history
* Moved docker-compose config to separate folder
  • Loading branch information
bravecobra committed Nov 13, 2022
1 parent 3cba808 commit 5fb6344
Show file tree
Hide file tree
Showing 16 changed files with 13 additions and 21 deletions.
16 changes: 5 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# emojivoto-dotnet
# EmojiVoto-dotnet

## Description

Expand Down Expand Up @@ -45,12 +45,6 @@ Docker now exposes Prometheus-compatible metrics on port 9323.

> You only need to enable this if you want metrics from the underlying docker daemon, pulled by the opentelemetry-collector.
### Compile

```powershell
.\build.ps1 --target Docker-Build
```

### Build docker images

```powershell
Expand Down Expand Up @@ -105,7 +99,7 @@ docker-compose down
Providing extra environment variables through `docker-compose.individual.yaml`, the app can be reconfigured to start outputting to those individual services `seq`, `jaeger` and `prometheus`.

```powershell
docker-compose --profile app --profile individual -f docker-compose.yml -f docker-compose.individual.yaml up -d --remove-orphans
docker-compose --profile app --profile individual -f docker-compose.yml -f ./docker-compose/docker-compose.individual.yaml up -d --remove-orphans
```

```mermaid
Expand Down Expand Up @@ -190,7 +184,7 @@ graph TD;
```

```powershell
docker-compose --profile app --profile grafana -f docker-compose.yml -f docker-compose.individual-grafana.yaml up -d --remove-orphans
docker-compose --profile app --profile grafana -f docker-compose.yml -f ./docker-compose/docker-compose.individual-grafana.yaml up -d --remove-orphans
```

Each component is reconfigured to output to each monitoring service. That means each service outputs:
Expand Down Expand Up @@ -246,7 +240,7 @@ having to reconfigure it in the application itself. Instead of configuring three
Reconfiguring to output to opentelemetry

```powershell
docker-compose --profile app --profile otlp -f docker-compose.yml -f docker-compose.otlp.yaml up -d --remove-orphans
docker-compose --profile app --profile otlp -f docker-compose.yml -f ./docker-compose/docker-compose.otlp.yaml up -d --remove-orphans
```

### Monitoring through opentelemetry (datadog)
Expand Down Expand Up @@ -288,5 +282,5 @@ graph TD;
```

```powershell
docker-compose --profile app --profile datadog -f docker-compose.yml -f docker-compose.otlp-datadog.yaml up -d --remove-orphans
docker-compose --profile app --profile datadog -f docker-compose.yml -f ./docker-compose/docker-compose.otlp-datadog.yaml up -d --remove-orphans
```
10 changes: 4 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ services:
profiles: ["grafana", "otlp"]
command: [ "-config.file=/etc/tempo.yaml" ]
volumes:
- ./config/tempo/tempo.yaml:/etc/tempo.yaml
- ./docker-compose/config/tempo/tempo.yaml:/etc/tempo.yaml
- tempo:/tmp/tempo
ports:
- "14268" # jaeger ingest
Expand All @@ -140,7 +140,7 @@ services:
restart: on-failure
volumes:
- loki:/loki
- ./config/loki/loki-config.yaml:/etc/loki/loki-config.yaml
- ./docker-compose/config/loki/loki-config.yaml:/etc/loki/loki-config.yaml

command: -config.file=/etc/loki/loki-config.yaml

Expand All @@ -158,7 +158,7 @@ services:
restart: on-failure
volumes:
- grafana:/var/lib/grafana
- ./config/grafana/provisioning/:/etc/grafana/provisioning/
- ./docker-compose/config/grafana/provisioning/:/etc/grafana/provisioning/
depends_on:
- loki
- prometheus
Expand All @@ -170,7 +170,7 @@ services:
profiles: ["individual", "otlp", "grafana"]
volumes:
- prometheus:/prometheus
- ./config/prometheus/prometheus.yaml:/etc/prometheus/prometheus.yml
- ./docker-compose/config/prometheus/prometheus.yaml:/etc/prometheus/prometheus.yml
ports:
- "9090:9090"

Expand All @@ -179,8 +179,6 @@ services:
container_name: otel-collector
profiles: ["otlp", "datadog"]
command: ["--config=/etc/otel-collector-config.yml"]
# volumes:
# - ./config/otel/otel-config-grafana.yaml:/etc/otel-collector-config.yml
ports:
- "4317:4317"
- "4318:4318"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,5 @@ services:
- DD_API_KEY=${DD_API_KEY}
- DD_SITE=${DD_SITE}
volumes:
- ./config/otel/otel-config-datadog.yaml:/etc/otel-collector-config.yml
- ./docker-compose/config/otel/otel-config-datadog.yaml:/etc/otel-collector-config.yml
- //var/run/docker.sock:/var/run/docker.sock
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ services:
- prometheus
otel-collector:
volumes:
- ./config/otel/otel-config-grafana.yaml:/etc/otel-collector-config.yml
- ./docker-compose/config/otel/otel-config-grafana.yaml:/etc/otel-collector-config.yml
- //var/run/docker.sock:/var/run/docker.sock
depends_on:
- loki
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "6.0",
"version": "6.0.100",
"rollForward": "latestMajor",
"allowPrerelease": true
}
Expand Down
2 changes: 1 addition & 1 deletion src/EmojiSvc.Tests/Services/EmojiSvcShould.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public EmojiSvcShould()
public async Task ReturnAllEmojis()
{
var sut = new EmojiGrpcSvc(NullLogger<EmojiGrpcSvc>.Instance, new AllEmoji(new InMemoryAllEmoji()), _mapper);
var actual = await sut.ListAll(new ListAllEmojiRequest(), null);
var actual = await sut.ListAll(new ListAllEmojiRequest(), null!);
Assert.Equal(99, actual.List.Count);
}

Expand Down

0 comments on commit 5fb6344

Please sign in to comment.