diff --git a/.woodpecker/build.yml b/.woodpecker/build.yml new file mode 100644 index 0000000..887c052 --- /dev/null +++ b/.woodpecker/build.yml @@ -0,0 +1,26 @@ +when: + path: + exclude: [ '*.md', 'docs/**' ] + +steps: + build: + image: rust:1-alpine + environment: + HOSTNAME: 'https://sleutel.boerlage.me' + RUSTC_WRAPPER: '/usr/bin/sccache' + CARGO_INCREMENTAL: '0' + commands: + - apk add sccache clang build-base protoc + - cargo build --release + containerize: + image: docker:24-dind + when: + event: push + branch: main + volumes: + - /var/run/docker.sock:/var/run/docker.sock + - /home/daan/.docker/config.json:/root/.docker/config.json + commands: + - apk add git + - docker buildx build -t git.boerlage.me/daan/sleutel:latest . + - docker push git.boerlage.me/daan/sleutel:latest \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..3a0f0bd --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +FROM scratch + +COPY ${CI_WORKSPACE}/target/release/sleutel /bootstrap + +ENV OTEL_SERVICE_NAME=sleutel +ENV OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317 +ENV OTEL_EXPORTER_OTLP_PROTOCOL=grpc +ENV OTEL_TRACES_SAMPLER=always_on +ENV axum_tracing_opentelemetry=info + +EXPOSE 3030 + +CMD ["/bootstrap"] \ No newline at end of file