version: '3.8'
services:
test:
build:
context: .
dockerfile: Dockerfile
container_name: derusted-test
environment:
- JWT_SECRET=test_secret_key_minimum_32_chars_for_security!!
- JWT_ISSUER=derusted-test
- JWT_AUDIENCE=proxy-test
- RUST_LOG=derusted=debug,info
volumes:
- .:/workspace
- cargo-registry:/usr/local/cargo/registry
- cargo-git:/usr/local/cargo/git
- target-cache:/workspace/target
networks:
- test-net
dns:
- 8.8.8.8
- 8.8.4.4
command: >
/bin/bash -c "
cd /workspace &&
echo '=== Running Derusted Test Suite ===' &&
echo 'Note: DNS tests require network access and may fail in restricted environments' &&
cargo test --lib &&
echo '=== Tests Complete ==='
"
volumes:
cargo-registry:
cargo-git:
target-cache:
networks:
test-net:
driver: bridge