FROM rust:1.75 as builder
WORKDIR /app
COPY . .
RUN cargo build --release
FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y \
libssl3 \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /app/target/release/centralized-exchange /usr/local/bin/
CMD ["centralized-exchange"]For the full Docker Compose setup, see Docker Setup.
- Database: Use connection pooling and read replicas
- Redis: Configure persistence and clustering
- Security:
- Use strong JWT secrets
- Enable HTTPS
- Set up rate limiting
- Implement DDoS protection
- Monitoring:
- Set up Prometheus metrics
- Configure log aggregation
- Implement health checks
- Scaling:
- Use a load balancer
- Scale horizontally
- Consider microservices architecture for specific components