Skip to content

feat: add env var example to docker-compose, add agent config to image #140

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

Merged
merged 1 commit into from
Dec 10, 2024
Merged
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
6 changes: 5 additions & 1 deletion packaging/docker/compose-linux-host.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ services:
agent:
image: "observeinc/observe-agent:latest"
pid: host
# Optionally use environment variables to configure the agent.
# environment:
# - TOKEN=${TOKEN}
# - OBSERVE_URL=${OBSERVE_URL}
volumes:
# Used for hostmetrics
- type: bind
Expand Down Expand Up @@ -29,7 +33,7 @@ services:
- type: bind
source: /var/lib/docker/containers
target: /var/lib/docker/containers
# Load agent from current directory
# Optionally load agent config from current directory.
- type: bind
source: ${PWD}/observe-agent.yaml
target: /etc/observe-agent/observe-agent.yaml
13 changes: 13 additions & 0 deletions packaging/docker/observe-agent/observe-agent.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# A minimal default agent config which should be overwritten via a docker volume or environment variables.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having this present in the image will avoid "file not found" issues when no alternative is provided via volume mount (ie when someone is running the image with env config only). If a volume is provided, that will be used instead of this.

debug: false
self_monitoring:
enabled: true
host_monitoring:
enabled: true
logs:
enabled: true
metrics:
host:
enabled: true
process:
enabled: false
Loading