30 lines
691 B
Docker
30 lines
691 B
Docker
# Elly Discord Bot Dockerfile
|
|
# ============================
|
|
|
|
FROM denoland/deno:latest
|
|
|
|
# Set working directory
|
|
WORKDIR /app
|
|
|
|
# Copy dependency files first for better caching
|
|
COPY deno.json deno.lock ./
|
|
|
|
# Cache dependencies (--frozen flag ensures lockfile v5 compatibility)
|
|
RUN deno install --frozen
|
|
|
|
# Copy source code
|
|
COPY src/ ./src/
|
|
|
|
# Copy config
|
|
COPY config.toml ./config.toml
|
|
COPY .env ./.env
|
|
|
|
# Create data and logs directories
|
|
RUN mkdir -p /app/data /app/logs
|
|
|
|
# Cache the main application
|
|
RUN deno cache --unstable-ffi src/index.ts
|
|
|
|
# Run the bot
|
|
CMD ["deno", "run", "--allow-net", "--allow-read", "--allow-write", "--allow-env", "--allow-ffi", "--unstable-ffi", "src/index.ts"]
|