remove caching of rust environment
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
12
Dockerfile
12
Dockerfile
@@ -6,16 +6,8 @@ RUN apt-get update && apt-get install -y \
|
||||
|
||||
WORKDIR "/app"
|
||||
|
||||
# Cache cargo build dependencies by creating a dummy source
|
||||
RUN mkdir src
|
||||
RUN echo "fn main() {}" > src/main.rs
|
||||
COPY Cargo.toml ./
|
||||
COPY Cargo.lock ./
|
||||
RUN cargo build --release --locked
|
||||
RUN rm /app/target/release/ohrwurm
|
||||
|
||||
COPY . .
|
||||
RUN cargo build --release --locked && cp /app/target/release/ohrwurm /ohrwurm
|
||||
RUN cargo build --release --locked
|
||||
|
||||
# Release image
|
||||
FROM debian:bullseye-slim
|
||||
@@ -23,6 +15,6 @@ FROM debian:bullseye-slim
|
||||
RUN apt-get update && apt-get install -y python3-pip ffmpeg
|
||||
RUN pip install -U yt-dlp
|
||||
|
||||
COPY --from=build /ohrwurm .
|
||||
COPY --from=build /app/target/release/ohrwurm .
|
||||
|
||||
CMD ["./ohrwurm"]
|
||||
|
||||
@@ -1,12 +1,8 @@
|
||||
---
|
||||
version: "2.1"
|
||||
services:
|
||||
ohrwurm:
|
||||
build: .
|
||||
container_name: ohrwurm
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- DISCORD_TOKEN=${DISCORD_TOKEN}
|
||||
- DISCORD_APP_ID=${DISCORD_APP_ID}
|
||||
- ADMIN=${ADMIN}
|
||||
- RUST_LOG=info
|
||||
env_file:
|
||||
- .env
|
||||
|
||||
Reference in New Issue
Block a user