ci: add Woodpecker CI matrix pipeline and missing cron Dockerfile
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
3b52e71c75
commit
235c5fce76
2 changed files with 70 additions and 0 deletions
40
.woodpecker.yml
Normal file
40
.woodpecker.yml
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
when:
|
||||
branch: high-performance
|
||||
event: push
|
||||
|
||||
matrix:
|
||||
SERVICE:
|
||||
- gateway
|
||||
- users
|
||||
- companies
|
||||
- job_seekers
|
||||
- customers
|
||||
- payments
|
||||
- employees
|
||||
- photographers
|
||||
- makeup_artists
|
||||
- tutors
|
||||
- developers
|
||||
- video_editors
|
||||
- graphic_designers
|
||||
- social_media_managers
|
||||
- fitness_trainers
|
||||
- catering_services
|
||||
- ugc_content_creators
|
||||
- cron
|
||||
|
||||
steps:
|
||||
- name: build-and-push
|
||||
image: woodpeckerci/plugin-docker-buildx
|
||||
settings:
|
||||
registry: ghcr.io
|
||||
repo: ghcr.io/traceworks2023/nxtgauge-rust-${SERVICE}
|
||||
context: .
|
||||
dockerfile: apps/${SERVICE}/Dockerfile
|
||||
tags:
|
||||
- high-performance-latest
|
||||
username:
|
||||
from_secret: GHCR_USERNAME
|
||||
password:
|
||||
from_secret: GHCR_TOKEN
|
||||
platforms: linux/amd64
|
||||
30
apps/cron/Dockerfile
Normal file
30
apps/cron/Dockerfile
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
FROM rust:1.79-slim AS builder
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
pkg-config \
|
||||
libssl-dev \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY Cargo.toml ./
|
||||
COPY crates ./crates
|
||||
COPY apps ./apps
|
||||
|
||||
RUN cargo build --release --bin cron
|
||||
|
||||
FROM debian:bookworm-slim AS runtime
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
ca-certificates \
|
||||
libssl3 \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN useradd -m -u 1000 appuser
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=builder /usr/src/app/target/release/cron ./cron
|
||||
|
||||
USER appuser
|
||||
|
||||
CMD ["./cron"]
|
||||
Loading…
Add table
Reference in a new issue