This sample is running on: https://go-gin.is-easy-on-scalingo.com/
Create an application on https://scalingo.com, then:
scalingo --app my-app git-setup
git push scalingo masterAnd that's it!
docker-compose upThe app listens by default on the port 3000 or the one defined in the PORT
environment variable.
This project now uses the official Scalingo Scheduler with a cron.json file
at the repository root:
{
"jobs": [
{
"command": "*/10 * * * * /bin/bash ./scripts/debug_dns_allowlist.sh"
}
]
}The schedule respects the Scalingo Scheduler limitation documented by Scalingo: the minimum interval is 10 minutes, and schedules are evaluated in UTC.
The job executed by the scheduler only probes domains you explicitly provide. It logs:
/etc/resolv.conf- Scalingo runtime context such as
APP,CONTAINER,HOSTNAME,SCALINGO_PRIVATE_HOSTNAME,SCALINGO_PRIVATE_NETWORK_ID, andREGION_NAME digoutput when availablegetent ahostsoutput when availablenslookupoutput when available
Available environment variables:
SCALINGO_APP=test-secnum
DNS_DEBUG_ALLOWLIST_FILE=./dns-allowlist.txt
DNS_DEBUG_CLI_TABLE_FILE=./private-networks-domain-names.txt
DNS_DEBUG_DOMAINS=db.internal.example,redis.internal.exampleLocal test:
cp dns-allowlist.txt.example dns-allowlist.txt
./scripts/debug_dns_allowlist.shYou can also inject the domains directly through an environment variable:
DNS_DEBUG_DOMAINS="db.internal.example redis.internal.example" ./scripts/debug_dns_allowlist.shOr paste the output of scalingo -a test-secnum private-networks-domain-names
into private-networks-domain-names.txt; the script extracts the DOMAIN NAME
column automatically:
cp private-networks-domain-names.txt.example private-networks-domain-names.txt
./scripts/debug_dns_allowlist.shThe repository also includes a helper script that waits a random amount of time, then triggers a real manual deployment through the Scalingo CLI:
chmod +x scripts/simulate_scalingo_deployments.sh
DEPLOY_BRANCH=main MIN_WAIT_SECONDS=30 MAX_WAIT_SECONDS=180 ./scripts/simulate_scalingo_deployments.sh test-secnumBy default the loop runs forever. Set DEPLOY_COUNT if you want a fixed number
of deployments:
DEPLOY_BRANCH=main DEPLOY_COUNT=5 MIN_WAIT_SECONDS=10 MAX_WAIT_SECONDS=30 ./scripts/simulate_scalingo_deployments.sh test-secnumIf you want the CLI to follow deployment logs, enable FOLLOW_DEPLOY=true:
DEPLOY_BRANCH=main FOLLOW_DEPLOY=true ./scripts/simulate_scalingo_deployments.sh test-secnum