Compare commits
12 Commits
alloy-v0.1
...
loki-v0.2.
| Author | SHA1 | Date | |
|---|---|---|---|
| 45d0ffe3bb | |||
| 6efe762f49 | |||
| fb54e86d3d | |||
| 269094be05 | |||
| 10b20bc6e7 | |||
| 143110847e | |||
| 531c82f4c1 | |||
| 20fb6572bc | |||
| 90133d9191 | |||
| 3edf33ccc2 | |||
| 83a467888f | |||
| 2541fae443 |
54
.github/workflows/action-build-and-push.yaml
vendored
54
.github/workflows/action-build-and-push.yaml
vendored
@@ -26,6 +26,38 @@ on:
|
|||||||
Path to the Dockerfile relative to the repository root.
|
Path to the Dockerfile relative to the repository root.
|
||||||
Example: ./Dockerfile or ./services/api/Dockerfile
|
Example: ./Dockerfile or ./services/api/Dockerfile
|
||||||
|
|
||||||
|
platforms:
|
||||||
|
type: string
|
||||||
|
required: false
|
||||||
|
default: linux/amd64,linux/arm64
|
||||||
|
description: >
|
||||||
|
Comma-separated list of target platforms to build.
|
||||||
|
Example: linux/amd64,linux/arm64
|
||||||
|
|
||||||
|
registry:
|
||||||
|
type: string
|
||||||
|
required: false
|
||||||
|
default: ghcr.io
|
||||||
|
description: >
|
||||||
|
Container registry to push the image to.
|
||||||
|
Example: ghcr.io or docker.io
|
||||||
|
|
||||||
|
registry_username:
|
||||||
|
type: string
|
||||||
|
required: false
|
||||||
|
default: ${{ github.repository_owner }}
|
||||||
|
description: >
|
||||||
|
Username for the container registry.
|
||||||
|
Example: myusername
|
||||||
|
|
||||||
|
registry_password:
|
||||||
|
type: string
|
||||||
|
required: false
|
||||||
|
default: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
description: >
|
||||||
|
Password or token for the container registry.
|
||||||
|
Example: secrets.GITHUB_TOKEN
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-push:
|
build-and-push:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -37,6 +69,11 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up QEMU (for cross-arch builds)
|
||||||
|
uses: docker/setup-qemu-action@v3
|
||||||
|
with:
|
||||||
|
platforms: arm64
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
@@ -48,24 +85,25 @@ jobs:
|
|||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@v5
|
uses: docker/metadata-action@v5
|
||||||
with:
|
with:
|
||||||
images: ghcr.io/${{ steps.lowercase.outputs.username }}/${{ inputs.image_name }}
|
images: ${{ inputs.registry }}/${{ steps.lowercase.outputs.username }}/${{ inputs.image_name }}
|
||||||
tags: |
|
tags: |
|
||||||
type=match,pattern=.*(v\d+\.\d+\.\d+),group=1
|
type=match,pattern=.*(v\d+\.\d+\.\d+),group=1
|
||||||
type=match,pattern=.*(v\d+\.\d+)\.\d+,group=1
|
type=match,pattern=.*(v\d+\.\d+)\.\d+,group=1
|
||||||
type=match,pattern=.*(v\d+)\.\d+\.\d+,group=1
|
type=match,pattern=.*(v\d+)\.\d+\.\d+,group=1
|
||||||
|
|
||||||
- name: Login to GitHub Container Registry
|
# - name: Login to GitHub Container Registry
|
||||||
uses: docker/login-action@v3
|
# uses: docker/login-action@v3
|
||||||
with:
|
# with:
|
||||||
registry: ghcr.io
|
# registry: ${{ inputs.registry }}
|
||||||
username: ${{ github.repository_owner }}
|
# username: ${{ inputs.registry_username }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
# password: ${{ inputs.registry_password }}
|
||||||
|
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
context: ${{ inputs.build_context }}
|
context: ${{ inputs.build_context }}
|
||||||
file: ${{ inputs.file_path }}
|
file: ${{ inputs.file_path }}
|
||||||
push: true
|
platforms: ${{ inputs.platforms }}
|
||||||
|
push: false
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
|||||||
@@ -14,4 +14,8 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
image_name: observability/loki
|
image_name: observability/loki
|
||||||
build_context: ./observability/loki
|
build_context: ./observability/loki
|
||||||
file_path: ./observability/loki/Dockerfile
|
file_path: ./observability/loki/Dockerfile
|
||||||
|
|
||||||
|
registry: gitea.obnitram.cloud
|
||||||
|
registry_username: ${{ github.repository_owner }}
|
||||||
|
registry_password: ${{ secrets.GITEA_TOKEN }}
|
||||||
@@ -4,6 +4,7 @@ FROM prom/prometheus:latest
|
|||||||
|
|
||||||
# Copy Prometheus configuration
|
# Copy Prometheus configuration
|
||||||
COPY prometheus.yaml /etc/prometheus/prometheus.yaml
|
COPY prometheus.yaml /etc/prometheus/prometheus.yaml
|
||||||
|
COPY prometheus-compose.yaml /etc/prometheus/prometheus-compose.yaml
|
||||||
|
|
||||||
# Switch to default user and expose port
|
# Switch to default user and expose port
|
||||||
EXPOSE 9090
|
EXPOSE 9090
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
# Prometheus main configuration
|
# Prometheus main configuration
|
||||||
|
# This configuration is adapted for Docker Compose environment
|
||||||
|
|
||||||
global:
|
global:
|
||||||
scrape_interval: 30s
|
scrape_interval: 30s
|
||||||
|
|||||||
@@ -60,9 +60,6 @@ services:
|
|||||||
|
|
||||||
prometheus:
|
prometheus:
|
||||||
image: ghcr.io/obnitram/observability/prometheus:v0.2
|
image: ghcr.io/obnitram/observability/prometheus:v0.2
|
||||||
command:
|
|
||||||
- "--config.file=/etc/prometheus/prometheus.yml"
|
|
||||||
- "--storage.tsdb.path=/prometheus"
|
|
||||||
volumes:
|
volumes:
|
||||||
- prometheus-storage:/prometheus
|
- prometheus-storage:/prometheus
|
||||||
deploy:
|
deploy:
|
||||||
|
|||||||
Reference in New Issue
Block a user