Skip to content

Commit

Permalink
Merge pull request #4 from EvilGenius13/buildkite-integration
Browse files Browse the repository at this point in the history
Buildkite integration
  • Loading branch information
EvilGenius13 authored Feb 8, 2024
2 parents 1a71997 + 3d620ed commit ba8a335
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
steps:
- name: ":docker: Build and Push Docker Image"
command: "scripts/build-and-push.sh"
11 changes: 9 additions & 2 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,20 @@ A lightweight, fast way to send data from your server to axiom for logging.
pip3 install -r requirements.txt
```

## Environment Variables
You need the following variables to run the app.
```bash
AXIOM_API_KEY=your_api_key
AXIOM_DATASET=your_dataset
```

## Usage
Local Code
*Locally*
```python
uvicorn app:app --reload
```

Docker
*Docker*
```bash
docker run -d -p 8000:8000 evilgenius13/axiomstarfire
```
Expand Down
5 changes: 5 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
version: '3'

services:
app:
build: .
2 changes: 0 additions & 2 deletions initializers/axiom_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,3 @@ def __init__(self):

async def send_event(self, event_data):
await asyncio.to_thread(self.client.ingest_events, AXIOM_DATASET, event_data)

# TODO: Build container via buildkite
11 changes: 11 additions & 0 deletions scripts/build-and-push.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

# Root directory of the project
cd "$(dirname "$0")/.."

# Build the Docker image using docker-compose and tag it with the latest tag and push it to the registry
docker-compose build app

docker tag "dev-build_app" "evilgenius13/starfire:latest"

docker push "evilgenius13/starfire:latest"

0 comments on commit ba8a335

Please sign in to comment.