#!/bin/bash set -e # If FLAG is set, write it to /app/flag.txt if [ -n "$FLAG" ]; then echo "$FLAG" > /app/flag.txt chmod 644 /app/flag.txt fi # Start flask in foreground exec gunicorn -b 0.0.0.0:${PORT} -w 2 -k gthread --threads 4 --timeout 30 app:app