Extract reconcile (#85)

This commit is contained in:
Andras Schmelczer 2025-07-13 11:06:42 +01:00 committed by GitHub
parent 75b020146a
commit bb0e44f06f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
141 changed files with 294 additions and 36720 deletions

33
sync-server/Dockerfile Normal file
View file

@ -0,0 +1,33 @@
FROM rust:1.87 AS builder
WORKDIR /usr/src/backend
RUN apt update && apt install -y musl-tools
RUN cargo install sqlx-cli
COPY . .
RUN sqlx database create --database-url sqlite://db.sqlite3
RUN sqlx migrate run --source src/app_state/database/migrations --database-url sqlite://db.sqlite3
RUN cargo build --release --target x86_64-unknown-linux-musl
# Runtime image
FROM alpine:3.22.0
LABEL org.opencontainers.image.authors="andras@schmelczer.dev"
RUN apk add --no-cache curl
COPY --from=builder /usr/src/backend/target/x86_64-unknown-linux-musl/release /app/sync_server
VOLUME /data
EXPOSE 3000/tcp
WORKDIR /data
HEALTHCHECK \
--interval=30s \
--timeout=5s \
CMD curl -f http://localhost:3000/vaults/fake/ping || exit 1
ENTRYPOINT ["/app/sync_server"]