-
Notifications
You must be signed in to change notification settings - Fork 0
Dev #24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dev #24
Changes from all commits
ce6e7a0
ac64c83
c6c043c
cc31713
f61f8df
03e38ae
cdd6c4c
5fa07b6
899a832
fe47705
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -39,10 +39,14 @@ RUN apk add --no-cache curl jq | |||||||||
|
|
||||||||||
| RUN --mount=type=secret,id=IPINFO_ACCESS_TOKEN \ | ||||||||||
| mkdir /data && \ | ||||||||||
| TOKEN=$(cat /run/secrets/IPINFO_ACCESS_TOKEN) && \ | ||||||||||
| EXPECTED_SHA256=$(curl -fsSL "https://ipinfo.io/data/free/country_asn.mmdb/checksums?token=${TOKEN}" | jq -r '.checksums.sha256') && \ | ||||||||||
| curl -fsSL "https://ipinfo.io/data/free/country_asn.mmdb?token=${TOKEN}" -o /data/country_asn.mmdb && \ | ||||||||||
| echo "${EXPECTED_SHA256} /data/country_asn.mmdb" | sha256sum -c - | ||||||||||
| if [ -f /run/secrets/IPINFO_ACCESS_TOKEN ]; then \ | ||||||||||
| TOKEN=$(cat /run/secrets/IPINFO_ACCESS_TOKEN) && \ | ||||||||||
| EXPECTED_SHA256=$(curl -fsSL "https://ipinfo.io/data/free/country_asn.mmdb/checksums?token=${TOKEN}" | jq -r '.checksums.sha256') && \ | ||||||||||
| curl -fsSL "https://ipinfo.io/data/free/country_asn.mmdb?token=${TOKEN}" -o /data/country_asn.mmdb && \ | ||||||||||
| echo "${EXPECTED_SHA256} /data/country_asn.mmdb" | sha256sum -c - ; \ | ||||||||||
| else \ | ||||||||||
| echo "WARNING: IPINFO_ACCESS_TOKEN not provided, skipping IPInfo database download" ; \ | ||||||||||
|
||||||||||
| echo "WARNING: IPINFO_ACCESS_TOKEN not provided, skipping IPInfo database download" ; \ | |
| echo "WARNING: IPINFO_ACCESS_TOKEN not provided, skipping IPInfo database download" && \ | |
| # Create a marker file so that the empty /data directory is clearly intentional | |
| touch /data/IPINFO_DATABASE_NOT_DOWNLOADED ; \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding
developto theignoreCommandis a good practice to prevent unnecessary deployments from the develop branch, aligning with typical CI/CD workflows where onlymainor specific release branches trigger production deployments.