ai/at
1
0
This commit is contained in:
2024-10-18 22:49:50 +09:00
parent bce11adb82
commit 5acaa7aeec
64 changed files with 2608 additions and 0 deletions

View File

@ -0,0 +1,5 @@
DATABASE_URL="drainpipe.db"
FRONTPAGE_CONSUMER_URL="http://${cloudflared}/api/receive_hook"
FRONTPAGE_CONSUMER_SECRET=`openssl ecparam --name secp256k1 --genkey --noout --outform DER | tail --bytes=+8 | head --bytes=32 | xxd --plain --cols 32`
#RELAY_URL=wss://syu.is

View File

@ -0,0 +1,20 @@
FROM rust:1.78-alpine AS builder
RUN apk add libressl-dev musl-dev sqlite-dev
WORKDIR /usr/src/unravel
COPY . .
# TODO: Use cargo-chef to cache dependencies compilation independently of the binary
RUN --mount=type=cache,target=/usr/local/cargo/registry \
--mount=type=cache,target=/root/target \
cargo build --release --package drainpipe && \
# Move the release binary to a folder to be copied to the final image. It can't be copied directly from the target folder because it's in a cache mount
# See https://gist.github.com/noelbundick/6922d26667616e2ba5c3aff59f0824cd?permalink_comment_id=4379948#gistcomment-4379948
mv ./target/release /root
FROM alpine:3.14
COPY --from=builder /root/release/drainpipe /
ENV DATABASE_URL="/drainpipedata/drainpipe.db"
ENTRYPOINT ["/drainpipe"]

View File

@ -0,0 +1,9 @@
services:
drainpipe:
build:
dockerfile: ./packages-rs/drainpipe/Dockerfile
context: ../../
env_file:
- ./.env.local
volumes:
- ./drainpipedata:/drainpipedata