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"
|
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 . .
|
COPY . .
|
||||||
RUN cargo build --release --locked && cp /app/target/release/ohrwurm /ohrwurm
|
RUN cargo build --release --locked
|
||||||
|
|
||||||
# Release image
|
# Release image
|
||||||
FROM debian:bullseye-slim
|
FROM debian:bullseye-slim
|
||||||
@@ -23,6 +15,6 @@ FROM debian:bullseye-slim
|
|||||||
RUN apt-get update && apt-get install -y python3-pip ffmpeg
|
RUN apt-get update && apt-get install -y python3-pip ffmpeg
|
||||||
RUN pip install -U yt-dlp
|
RUN pip install -U yt-dlp
|
||||||
|
|
||||||
COPY --from=build /ohrwurm .
|
COPY --from=build /app/target/release/ohrwurm .
|
||||||
|
|
||||||
CMD ["./ohrwurm"]
|
CMD ["./ohrwurm"]
|
||||||
|
|||||||
@@ -1,12 +1,8 @@
|
|||||||
---
|
---
|
||||||
version: "2.1"
|
|
||||||
services:
|
services:
|
||||||
ohrwurm:
|
ohrwurm:
|
||||||
build: .
|
build: .
|
||||||
container_name: ohrwurm
|
container_name: ohrwurm
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
environment:
|
env_file:
|
||||||
- DISCORD_TOKEN=${DISCORD_TOKEN}
|
- .env
|
||||||
- DISCORD_APP_ID=${DISCORD_APP_ID}
|
|
||||||
- ADMIN=${ADMIN}
|
|
||||||
- RUST_LOG=info
|
|
||||||
|
|||||||
Reference in New Issue
Block a user