File tree Expand file tree Collapse file tree 4 files changed +75
-82
lines changed
Expand file tree Collapse file tree 4 files changed +75
-82
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ ---
2+ name : Release
3+
4+ on :
5+ pull_request :
6+ push :
7+ branches : ["main"]
8+ release :
9+ types : ["published"]
10+
11+ jobs :
12+ build-image :
13+ if : ${{ github.event.pull_request.head.repo.full_name == github.repository || github.event_name != 'pull_request' }}
14+ runs-on : ubuntu-latest
15+ permissions :
16+ contents : read
17+ packages : write
18+ steps :
19+ - name : Checkout
20+ uses : actions/checkout@v4
21+
22+ - name : Docker meta
23+ id : meta
24+ uses : docker/metadata-action@v5
25+ with :
26+ images : |
27+ ghcr.io/${{ github.repository }}
28+ tags : |
29+ type=semver,pattern={{version}},prefix=v
30+ type=semver,pattern={{major}}.{{minor}},prefix=v
31+ type=semver,pattern={{major}},prefix=v
32+ type=ref,event=branch
33+ type=ref,event=pr
34+ flavor : |
35+ latest=auto
36+
37+ - name : Set up QEMU
38+ uses : docker/setup-qemu-action@v3
39+
40+ - name : Set up Docker Buildx
41+ uses : docker/setup-buildx-action@v3
42+
43+ - name : Login to GitHub Container Registry
44+ uses : docker/login-action@v3
45+ with :
46+ registry : ghcr.io
47+ username : ${{ github.actor }}
48+ password : ${{ secrets.GITHUB_TOKEN }}
49+
50+ - name : Build and Push
51+ uses : docker/build-push-action@v6
52+ with :
53+ context : .
54+ file : ./Dockerfile
55+ platforms : linux/amd64 # TODO: arm64 builds take ~4 hours to complete
56+ push : true
57+ tags : ${{ steps.meta.outputs.tags }}
58+ labels : ${{ steps.meta.outputs.labels }}
Original file line number Diff line number Diff line change 1- FROM lukemathwalker/cargo-chef:latest-rust-1.84.1-slim-bookworm AS chef
1+ FROM docker.io/ lukemathwalker/cargo-chef:latest-rust-1.83.0-alpine3.21 AS chef
22WORKDIR /app
33
44FROM chef AS planner
55COPY . .
66RUN cargo chef prepare --recipe-path recipe.json
77
88FROM chef AS builder
9-
10- # Ensure working C compile setup (not installed by default in arm64 images)
11- RUN apt update && apt install build-essential -y
12-
9+ RUN apk add --no-cache build-base
1310COPY --from=planner /app/recipe.json recipe.json
1411RUN cargo chef cook --release --recipe-path recipe.json
15-
1612COPY . .
1713RUN cargo build --release --bin atuin-server-sqlite-unofficial
1814
19- FROM debian:bookworm-20250113-slim AS runtime
20-
21- RUN useradd -c 'atuin user' atuin && mkdir /config && chown atuin:atuin /config
22- # Install ca-certificates for webhooks to work
23- RUN apt update && apt install ca-certificates sqlite3 -y && rm -rf /var/lib/apt/lists/*
24- WORKDIR /app
25-
26- USER atuin
27-
28- ENV TZ=Etc/UTC
29- ENV RUST_LOG=atuin::api=info
30- ENV ATUIN_CONFIG_DIR=/config
31-
15+ FROM docker.io/library/alpine:3.21
16+ ENV RUST_LOG=atuin::api=info \
17+ TZ=Etc/UTC \
18+ ATUIN_HOST=0.0.0.0 \
19+ ATUIN_PORT=8888 \
20+ ATUIN_CONFIG_DIR=/config \
21+ ATUIN_DB_URI=sqlite:///config/atuin.db
22+ RUN apk add --no-cache ca-certificates catatonit sqlite-libs tzdata
23+ USER nobody:nogroup
24+ WORKDIR /config
25+ VOLUME ["/config" ]
3226COPY --from=builder /app/target/release/atuin-server-sqlite-unofficial /usr/local/bin
33- ENTRYPOINT ["/usr/local/bin/atuin-server-sqlite-unofficial" ]
27+ ENTRYPOINT ["/usr/bin/catatonit" , "--" , "/usr/local/bin/atuin-server-sqlite-unofficial" ]
28+ CMD ["server" , "start" ]
Original file line number Diff line number Diff line change 1- # atuin sqlite
1+ # Atuin server sqlite
22
3- atuin server but uses sqlite backend.
4-
5- ## Support ⚠️
6-
7- While I am a maintainer of ` atuin ` , This is not an officially supported project and it mostly exists because people kept asking for it and
8- it wasn't too hard to put here.
9-
10- ## Usage
11-
12- ``` sh
13- cargo install --release --git https://github.com/conradludgate/atuin-server-sqlite
14- export ATUIN_DB_URI=sqlite://path/to/sqlite/file.db
15- atuin-server-sqlite-unofficial
16- ```
17-
18- See the atuin self hosting docs for more info on settings.
3+ Also a project to learn multi-arch container builds.
You can’t perform that action at this time.
0 commit comments