Compare commits
2 commits
c8950355cf
...
bf3bf693bd
Author | SHA1 | Date | |
---|---|---|---|
bf3bf693bd | |||
2cda158897 |
4 changed files with 75 additions and 0 deletions
2
.dockerignore
Normal file
2
.dockerignore
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
.git
|
||||||
|
target
|
42
.forgejo/workflows/build.yml
Normal file
42
.forgejo/workflows/build.yml
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
name: ci
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- docker
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
docker-build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v3
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Login to Forge Hub
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: forge.k3s.fr
|
||||||
|
username: ${{ secrets.FORGEHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.FORGEHUB_TOKEN }}
|
||||||
|
- name: Build and push
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
push: true
|
||||||
|
tags: forge.k3s.fr/frank/opentsdb-auth-proxy:latest
|
||||||
|
|
||||||
|
- name: Login to Docker Hub
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.FORGEHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.FORGEHUB_TOKEN }}
|
||||||
|
- name: Build and push
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
push: true
|
||||||
|
tags: frankkkkk/opentsdb-auth-proxy:latest
|
23
Dockerfile
Normal file
23
Dockerfile
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
FROM rust:1.78 AS chef
|
||||||
|
# We only pay the installation cost once,
|
||||||
|
# it will be cached from the second build onwards
|
||||||
|
RUN cargo install cargo-chef
|
||||||
|
WORKDIR app
|
||||||
|
|
||||||
|
FROM chef AS planner
|
||||||
|
COPY . .
|
||||||
|
RUN cargo chef prepare --recipe-path recipe.json
|
||||||
|
|
||||||
|
FROM chef AS builder
|
||||||
|
COPY --from=planner /app/recipe.json recipe.json
|
||||||
|
# Build dependencies - this is the caching Docker layer!
|
||||||
|
RUN cargo chef cook --release --recipe-path recipe.json
|
||||||
|
# Build application
|
||||||
|
COPY . .
|
||||||
|
RUN cargo build --release --bin opentsdb-auth-proxy
|
||||||
|
|
||||||
|
# We do not need the Rust toolchain to run the binary!
|
||||||
|
FROM ubuntu:22.04
|
||||||
|
WORKDIR app
|
||||||
|
COPY --from=builder /app/target/release/opentsdb-auth-proxy /usr/local/bin
|
||||||
|
ENTRYPOINT ["/usr/local/bin/opentsdb-auth-proxy"]
|
|
@ -47,6 +47,14 @@ if the token is reasonably random.
|
||||||
|
|
||||||
To be implemented; but don't do it.
|
To be implemented; but don't do it.
|
||||||
|
|
||||||
|
|
||||||
|
## Environment variables
|
||||||
|
|
||||||
|
The following env variables are supported:
|
||||||
|
|
||||||
|
- `CONFIG_FILE` : the location of the config file
|
||||||
|
- `OPENTSDB_URL` (in this case, don't set it in the config file)
|
||||||
|
|
||||||
## Notes about exposing OpenTSDB
|
## Notes about exposing OpenTSDB
|
||||||
|
|
||||||
Currently, OpenTSDB does not support authentication. If you run opentsdb in a k8s
|
Currently, OpenTSDB does not support authentication. If you run opentsdb in a k8s
|
||||||
|
|
Loading…
Reference in a new issue