- Zero Downtime
- Graceful shutdowns
- Via Github Actions
- Zero infrastructure management overhead
The general idea is to have Github Actions test, build and deploy a Rails app to Google Cloud Compute Engine.
/* | |
RUN THE SCRIPT BY YOURSELF: | |
- Run `node paddle-revenue.js` on your server and let it run 24/7. | |
- Access the API at http://your_server_ip:8175/ (JSON) | |
HOSTED VERSION: | |
If you don't want to run the script by your own, you can use the | |
hosted version. The price is $5 per month per Paddle account. | |
Here is how: |
[ | |
{name: 'Afghanistan', code: 'AF'}, | |
{name: 'Åland Islands', code: 'AX'}, | |
{name: 'Albania', code: 'AL'}, | |
{name: 'Algeria', code: 'DZ'}, | |
{name: 'American Samoa', code: 'AS'}, | |
{name: 'AndorrA', code: 'AD'}, | |
{name: 'Angola', code: 'AO'}, | |
{name: 'Anguilla', code: 'AI'}, | |
{name: 'Antarctica', code: 'AQ'}, |
#!/usr/bin/env bash | |
# REF: https://cloud.google.com/armor/docs/integrating-cloud-armor#with_ingress | |
# REF: https://cloud.google.com/armor/docs/configure-security-policies | |
# REF: https://cloud.google.com/iap/docs/load-balancer-howto | |
# REF: https://cloud.google.com/sdk/gcloud/reference/compute/url-maps/add-path-matcher | |
# REF: https://cloud.google.com/load-balancing/docs/https/setting-up-url-rewrite | |
export PROJECT_ID=$(gcloud config get-value project) | |
export PROJECT_USER=$(gcloud config get-value core/account) # set current user |
sentry
SENTRY_SECRET_KEY
to random 32 char stringdocker-compose up -d
docker-compose exec sentry sentry upgrade
to setup database and create admin userdocker-compose exec sentry pip install sentry-slack
if you want slack plugin, it can be done laterdocker-compose restart sentry
9000
Last revised on [DATE]
[COMPANY] will collect certain non-personally identify information about you as you use our sites. We may use this data to better understand our users. We can also publish this data, but the data will be about a large group of users, not individuals.
We will also ask you to provide personal information, but you'll always be able to opt out. If you give us personal information, we won't do anything evil with it.
Last revised on [DATE]
[COMPANY] operates the [SERVICE] service, which we hope you use. If you use it, please use it responsibly. If you don't, we'll have to terminate your account.
For paid accounts, you'll be charged on a monthly basis. You can cancel anytime, but there are no refunds.
import os | |
import re | |
from email.mime.image import MIMEImage | |
from email.mime.multipart import MIMEMultipart | |
from email.mime.text import MIMEText | |
from smtplib import SMTP, SMTP_SSL, SMTPAuthenticationError, SMTPException | |
from urllib.parse import urlparse | |
import requests | |
from bs4 import BeautifulSoup | |
from jinja2 import Template |
image: openjdk:8-jdk | |
variables: | |
ANDROID_COMPILE_SDK: "29" | |
ANDROID_BUILD_TOOLS: "29.0.3" | |
SDK_TOOLS: "6200805" # from https://developer.android.com/studio/#command-tools | |
EMULATOR_VERSION: "24" | |
before_script: | |
- wget --quiet --output-document=android-sdk.zip https://dl.google.com/android/repository/commandlinetools-linux-${SDK_TOOLS}_latest.zip |