fix: use manual volume at /data for Deno cache

Simplified Docker configuration to use manually mounted volume at /data
instead of complex pre-caching strategy. This approach:

- Uses ENV DENO_DIR=/data to point to manually created Railway volume
- Keeps Dockerfile simple and maintainable
- Adds --allow-read/--allow-write permissions for cache access
- Removes railway.toml volume configuration (manual setup instead)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Ajax Davis 2025-12-05 01:05:07 +10:00
parent d843d7b78d
commit ade550dcf4

View file

@ -4,11 +4,15 @@ FROM denoland/deno:1.39.0
# Set working directory
WORKDIR /app
# Copy the server file
# Set Deno cache directory to use mounted volume
ENV DENO_DIR=/data
# Copy files
COPY server.ts .
COPY deno.json .
# Expose port (Railway will set PORT env var)
EXPOSE 3002
# Run the Deno server
CMD ["deno", "run", "--allow-net", "--allow-env", "server.ts"]
CMD ["deno", "run", "--allow-net", "--allow-env", "--allow-read", "--allow-write", "server.ts"]