Skip to content

Commit

Permalink
chore: update docker images
Browse files Browse the repository at this point in the history
  • Loading branch information
dansiegel committed Oct 19, 2024
1 parent 6a0f2d9 commit 6e61ddd
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 26 deletions.
80 changes: 59 additions & 21 deletions docs/plugins/logging/gelf.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ Graylog is a great option for Developers. We find that there are generally 2 cat

## Setup



## Local Debugging

Below is a sample docker file. You can use this to create a local Graylog stack using the [Graylog Docker image](https://hub.docker.com/r/graylog/graylog/). This can be useful for testing application logs locally. Requires [Docker](https://www.docker.com/get-docker) and Docker Compose.
Expand All @@ -22,37 +20,77 @@ Below is a sample docker file. You can use this to create a local Graylog stack
- Credentials: admin/admin
- Create a UDP input on port 12201 and set `GelfLoggerOptions.Host` to `localhost`.

> [!NOTE]
> The username and password are both `admin`. This should only be used for local testing. If putting this into production be sure to update the password.
```docker
services:
mongo:
image: mongo:4.2
mongodb:
image: mongo:4.4
container_name: graylog-mongodb
restart: always
volumes:
- /docker/graylog/data/mongodb:/data/db
networks:
- graylog-network
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch-oss:7.10.0
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.9
container_name: graylog-elasticsearch
restart: always
environment:
- http.host=0.0.0.0
- transport.host=localhost
- discovery.type=single-node
- ES_JAVA_OPTS=-Xms1g -Xmx1g
- xpack.security.enabled=false
- xpack.monitoring.enabled=false
- xpack.ml.enabled=false
- network.host=0.0.0.0
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- /docker/graylog/data/elasticsearch:/usr/share/elasticsearch/data
networks:
- graylog-network
graylog:
image: graylog/graylog:4.0
environment:
- GRAYLOG_PASSWORD_SECRET="!ux*lAfQVjaRT8iI"
- GRAYLOG_ROOT_PASSWORD_SHA2=8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918
- GRAYLOG_HTTP_EXTERNAL_URI=http://localhost:9000/
entrypoint: /usr/bin/tini -- wait-for-it elasticsearch:9200 -- /docker-entrypoint.sh
image: graylog/graylog:4.3
container_name: graylog
restart: always
depends_on:
- mongo
- mongodb
- elasticsearch
environment:
- GRAYLOG_PASSWORD_SECRET=somepasswordpepper
# Password: "admin"
- GRAYLOG_ROOT_PASSWORD_SHA2=8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918
- GRAYLOG_HTTP_EXTERNAL_URI=http://127.0.0.1:9000/
- GRAYLOG_ELASTICSEARCH_HOSTS=http://elasticsearch:9200
- GRAYLOG_MONGODB_URI=mongodb://mongodb:27017/graylog
ports:
- 9000:9000
- 1514:1514
- 1514:1514/udp
- 12201:12201
- 12201:12201/udp
- 12202:12202
# Graylog web interface and REST API
- "9000:9000/tcp"
# Beats
- "5044:5044/tcp"
# Syslog TCP
- "5140:5140/tcp"
# Syslog UDP
- "5140:5140/udp"
# GELF TCP
- "12201:12201/tcp"
# GELF UDP
- "12201:12201/udp"
# Forwarder data
- "13301:13301/tcp"
# Forwarder config
- "13302:13302/tcp"
volumes:
- /docker/graylog/data/graylog:/usr/share/graylog/data/journal
networks:
- graylog-network
networks:
graylog-network:
driver: bridge
```
8 changes: 3 additions & 5 deletions docs/plugins/logging/raygun.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ Raygun offers a free Open Source version for Crash Detection that can be run in
To get started you can copy the following docker compose sample. You can set the localpath for the volumes to persist the crash data over time and ensure that the downloaded Ollama models are persisted and do not need to be downloaded again.

```docker
version: '3.8'
services:
raygun-aspire-portal:
image: raygunowner/raygun-aspire-portal:latest
Expand All @@ -31,7 +29,7 @@ services:
- "8080:8080"
restart: always
volumes:
- /localpath/raygun/errors:/app/raygun/errors
- /docker/raygun/data/errors:/app/raygun/errors
depends_on:
- ollama-service # Ensure Ollama service starts before this container
Expand All @@ -40,7 +38,7 @@ services:
container_name: ollama_local_aier
restart: always
volumes:
- /localpath/ollama:/root/.ollama # Mount local directory to container for data persistence
- /docker/raygun/data/ollama:/root/.ollama # Mount local directory to container for data persistence
```

To use Raygun for local development with your Docker image, you can use the special extension as shown below:
Expand All @@ -52,4 +50,4 @@ container.UsePrismLogging(logging =>

## Prism.Essentials Integration

The Raygun Implementation of the Logger makes reference to the [Prism.Plugin.Essentials](xref:Plugins.Essentials.GettingStarted) library. This allows us to dynamically check if various Essentials interfaces have been registered. If they have we automatically tailor the Logger to include offline support with request caching. Additionally we will automatically update the configuration to make use of the [Application Context](xref:Plugins.Essentials.AppContext) from Essentials.
The Raygun Implementation of the Logger makes reference to the [Prism.Plugin.Essentials](xref:Plugins.Essentials.GettingStarted) library. This allows us to dynamically check if various Essentials interfaces have been registered. If they have we automatically tailor the Logger to include offline support with request caching. Additionally we will automatically update the configuration to make use of the [Application Context](xref:Plugins.Essentials.AppContext) from Essentials. In order to enable sending logs in the background with the offline store, be sure to Register Prism.Plugin.Essentials first.

0 comments on commit 6e61ddd

Please sign in to comment.