this repo has no description

docker compose file #1

closed opened by teal.fm targeting master from docker
Labels

None yet.

Participants 1
AT URI
at://did:plc:iwhuynr6mm6xxuh25o4do2tx/sh.tangled.repo.pull/3lz4sincne622
+57 -1
Diff #2
+46
Dockerfile
··· 1 + # Use the official Rust image 2 + FROM rust:1.82-slim as builder 3 + 4 + # Install build dependencies 5 + RUN apt-get update && apt-get install -y \ 6 + pkg-config \ 7 + libssl-dev \ 8 + && rm -rf /var/lib/apt/lists/* 9 + 10 + # Set working directory 11 + WORKDIR /app 12 + 13 + # Copy manifest files 14 + COPY Cargo.toml Cargo.lock ./ 15 + 16 + # Copy source code 17 + COPY src ./src 18 + 19 + # Build the application 20 + RUN cargo build --release 21 + 22 + # Runtime stage 23 + FROM debian:bookworm-slim 24 + 25 + # Install runtime dependencies 26 + RUN apt-get update && apt-get install -y \ 27 + ca-certificates \ 28 + && rm -rf /var/lib/apt/lists/* 29 + 30 + # Create app user 31 + RUN useradd -r -s /bin/false appuser 32 + 33 + # Set working directory 34 + WORKDIR /app 35 + 36 + # Copy the binary from builder stage 37 + COPY --from=builder /app/target/release/discordhose /app/discordhose 38 + 39 + # Change ownership to app user 40 + RUN chown -R appuser:appuser /app 41 + 42 + # Switch to app user 43 + USER appuser 44 + 45 + # Run the application 46 + CMD ["./discordhose"]
+10
docker-compose.yml
··· 1 + services: 2 + discordhose: 3 + build: . 4 + environment: 5 + - DISCORD_WEBHOOK_URL=${DISCORD_WEBHOOK_URL} 6 + env_file: 7 + - .env 8 + restart: unless-stopped 9 + volumes: 10 + - ./.env:/app/.env:ro
+1 -1
Cargo.toml
··· 1 1 [package] 2 2 name = "discordhose" 3 3 version = "0.1.0" 4 - edition = "2024" 4 + edition = "2021" 5 5 6 6 [dependencies] 7 7 anyhow = "1.0.99"

History

3 rounds 0 comments
sign up or login to add to the discussion
3 commits
expand
docker
remove unnecessary stuff form dockerfile
actually work lol
expand 0 comments
closed without merging
2 commits
expand
docker
remove unnecessary stuff form dockerfile
expand 0 comments
teal.fm submitted #0
1 commit
expand
docker
expand 0 comments