version: '3.8'
services:
proofmode:
image: proofmode-rust:local
container_name: proofmode-example
user: "${USER_ID:-1000}:${GROUP_ID:-1000}"
volumes:
- ./input:/app/input:ro
- ./output:/app/output
- ./config.toml:/config.toml:ro
environment:
- RUST_LOG=info
- PGP_PASSPHRASE=${PGP_PASSPHRASE:-defaultpassword}
command: generate -f /app/input/test.jpg -s /app/output
media-processor:
image: alpine:latest
container_name: media-processor
volumes:
- ./input:/media:ro
- ./output:/proofs
depends_on:
- proofmode
command: >
sh -c "
echo 'Processing media files...';
# Your media processing logic here
# Then call proofmode to generate proofs
for file in /media/*.jpg; do
echo \"Processing $$file\";
# Process the file...
done
"
proofmode-watch:
image: proofmode-rust:local
container_name: proofmode-watch
environment:
- RUST_LOG=info
command: >
sh -c "while true; do
echo 'Checking for new files...';
for file in /input/*.jpg /input/*.mp4; do
if [ -f \"\$\$file\" ] && [ ! -f \"/output/\$\$(basename \"\$\$file\").proof.json\" ]; then
echo \"Processing \$\$file\";
proofmode generate -f \"\$\$file\";
fi;
done;
sleep 10;
done"
volumes:
- ./input:/input:ro
- ./output:/output
restart: unless-stopped
volumes:
proofmode-data: