This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: pod-with-sidecar-container | |
spec: | |
initContainers: | |
# Normal Init Container | |
- name: database-initializer | |
image: db-init:v1.34.0 | |
# Sidecar Container |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install postgres plugin | |
dokku plugin:install https://github.com/dokku/dokku-postgres.git postgres | |
# Create postgres database | |
dokku postgres:create my-database | |
# Link the postgres with the app | |
dokku postgres:link <DB_NAME> <APP_NAME> | |
# eg: dokku postgres:link my-database getting-started-with-dokku |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SSH into the virtual machine | |
ssh root@<vm-public-ip-address> | |
# Add their public keys to the authorized keys | |
vi ~/.ssh/authorised_keys | |
# Add their public keys to the dokku application | |
dokku ssh-keys:add <user> <path-to-public-key> | |
# eg: dokku ssh-keys:add prasanna /root/pub-keys/prasanna.pub | |
# List the users who have permission | |
dokku ssh-keys:list |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Push the changes to remote(dokku) origin | |
git push dokku master | |
# List the apps in dokku | |
dokku apps:list |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Clone the repo | |
git clone [email protected]:worldofprasanna/getting-started-with-dokku.git | |
# cd into the repo | |
cd getting-started-with-dokku | |
# Install dokku client locally | |
brew install dokku/repo/dokku | |
# Create dokku app | |
dokku apps:create getting-started-with-dokku | |
# Add a git remote to point to dokku app | |
git remote add dokku dokku@<vm-public-ip-address>:getting-started-with-dokku |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh root@<vm-public-ip-address> | |
# Inside VM | |
wget https://raw.githubusercontent.com/dokku/dokku/v0.20.4/bootstrap.sh | |
sudo DOKKU_TAG=v0.20.4 bash bootstrap.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "aws_s3_bucket" "main" { | |
... | |
policy = data.aws_iam_policy_document.bucket_policy.json | |
website { | |
index_document = var.index_document | |
} | |
... | |
data "aws_iam_policy_document" "bucket_policy" { | |
... | |
actions = [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module "staticwebsite" { | |
source = "worldofprasanna/staticwebsite/aws" | |
version = "1.0.0" | |
domain = "yourdomain.com" | |
} | |
# To create the resource, | |
terraform apply | |
# To upload the static assests, | |
aws s3 sync build/ s3://yourdomain.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2020/05/02 19:50:54 [INFO] Terraform version: 0.12.24 | |
2020/05/02 19:50:54 [INFO] Go runtime version: go1.13.8 | |
2020/05/02 19:50:54 [INFO] CLI args: []string{"/usr/local/bin/terraform", "apply"} | |
2020/05/02 19:50:54 [DEBUG] Attempting to open CLI config file: /Users/prasanna/.terraformrc | |
2020/05/02 19:50:54 [DEBUG] File doesn't exist, but doesn't need to. Ignoring. | |
2020/05/02 19:50:54 [INFO] CLI command args: []string{"apply"} | |
2020/05/02 19:50:54 [TRACE] Meta.Backend: no config given or present on disk, so returning nil config | |
2020/05/02 19:50:54 [TRACE] Meta.Backend: backend has not previously been initialized in this working directory | |
2020/05/02 19:50:54 [DEBUG] New state was assigned lineage "39f352e1-5d2f-f7a4-b2ff-273d5267b668" | |
2020/05/02 19:50:54 [TRACE] Meta.Backend: using default local state only (no backend configuration, and no existing initialized backend) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import os | |
from gpapi.googleplay import GooglePlayAPI | |
def main(): | |
server = GooglePlayAPI('en_US', 'America/New York', 'bacon') | |
try: | |
server.login(email="<gmail userid>", password="<gmail password>") | |
storagepath = '/tmp/' | |
download = server.download('com.whatsapp', expansion_files=False) |
NewerOlder