simple-calculator / entrypoint.sh
Gianpaolo Macario
feat: first shot at dockerizing app.py
e21102a
raw
history blame contribute delete
337 Bytes
#!/bin/bash
# Create Modal config directory
mkdir -p ~/.modal
# Write Modal token configuration if provided
if [ ! -z "$MODAL_TOKEN_ID" ] && [ ! -z "$MODAL_TOKEN_SECRET" ]; then
echo "{\"token_id\":\"$MODAL_TOKEN_ID\",\"token_secret\":\"$MODAL_TOKEN_SECRET\"}" > ~/.modal/config.json
fi
# Start the application
exec python app.py