feat: add bare

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
2024-08-23 21:51:42 +02:00
parent bf7a7db868
commit a4213ea61f
44 changed files with 1047 additions and 4335 deletions

View File

@@ -1,38 +0,0 @@
FROM rustlang/rust:nightly as base
RUN rustup target add x86_64-unknown-linux-musl
RUN apt-get update -qq && \
apt-get install -y \
musl-tools \
musl-dev
RUN update-ca-certificates
RUN apt-get update && apt-get upgrade -y
RUN apt-get install -y -q build-essential curl git
WORKDIR /app/cuddle/
COPY . .
RUN cargo install --target x86_64-unknown-linux-musl --path cuddle
FROM docker:dind
RUN apk add bash git kubectl
ENV SLICE_VERSION=v1.2.7
RUN wget -O kubectl-slice_linux_x86_64.tar.gz \
"https://github.com/patrickdappollonio/kubectl-slice/releases/download/$SLICE_VERSION/kubectl-slice_linux_x86_64.tar.gz" && \
tar -xf kubectl-slice_linux_x86_64.tar.gz && \
chmod +x ./kubectl-slice && \
mv ./kubectl-slice /usr/local/bin/kubectl-slice && \
rm kubectl-slice_linux_x86_64.tar.gz
RUN eval `ssh-agent`
COPY --from=1password/op:2 /usr/local/bin/op /usr/local/bin/op
COPY --from=base /usr/local/cargo/bin/ /usr/local/cargo/bin/
ENV PATH="${PATH}:/usr/local/cargo/bin"

View File

@@ -1,3 +0,0 @@
.cuddle/
.git/
target/

View File

@@ -0,0 +1,15 @@
version: "3"
services:
crdb:
restart: 'always'
image: 'cockroachdb/cockroach:v23.1.14'
command: 'start-single-node --advertise-addr 0.0.0.0 --insecure'
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health?ready=1"]
interval: '10s'
timeout: '30s'
retries: 5
start_period: '20s'
ports:
- 8080:8080
- '26257:26257'