Search domain name mentions across twitter.
Add .env
file (these credentials are not real, but preserve the actual format):
TWITTER_CONSUMER_KEY=ppr4YnaPS33lryG3bSY3quRzJ
TWITTER_CONSUMER_SECRET=ugKldX6jde3FxIObZpewSHtFkd347OHf1Hp5rcf31m34Vk64rl
TWITTER_ACCESS_TOKEN=1713520596-ynQ7kKGcnZKAlodMLLWUhUNa4pS274OYsSO235o
TWITTER_ACCESS_TOKEN_SECRET=4fhlkQnSpUrQq7ZpcT3OBD0gSyNkMS8oprHyFAdVpwoeY
FIREBASE_API_KEY=AIucwoCtT1cN7VndpSF2jQgGpM3o-cplZvOOjnM
FIREBASE_AUTH_DOMAIN=example.firebaseapp.com
FIREBASE_DATABASE_URL=https://example.firebaseio.com
FIREBASE_PROJECT_ID=example
FIREBASE_STORAGE_BUCKET=example.appspot.com
FIREBASE_MESSAGING_SENDER_ID=345687693302
FIREBASE_APP_ID=1:384557623309:web:acf821f7321f636390d938
FIREBASE_MEASUREMENT_ID=G-WE339SORBL
DOMAIN_NAME=example.com
RECURSION_DEPTH_LIMIT=5
Generate Firebase Admin SDK credentials and copy in ./firebase-adminsdk.json
.
DO_TOKEN
- Digital Ocean person access token. Can be found in personal access token section.DO_SSH_KEY_NAME
- Digital Ocean SSH key name. Can be found in SSH keys section.DO_SSH_USER
- Digital Ocean SSH username. Defaults toroot
.SSH_PRIVATE_KEY_PATH
- Path to SSH private key on the host machine. E.g$HOME/.ssh/id_rsa
.
terraform apply \
-var "do_token=${DO_TOKEN}" \
-var "do_ssh_user=${DO_SSH_USER}" \
-var "do_ssh_key_name=${DO_SSH_KEY_NAME}" \
-var "ssh_private_key=${SSH_PRIVATE_KEY_PATH}"
Install ansible playbooks:
ansible-galaxy install gantsign.oh-my-zsh \
geerlingguy.docker
Ansible playbook gets executed by Terraform's local-exec
provisioner
Manual run of docker host playbook:
ansible-playbook -i <ip-address>, provision.yml -u root
DOCKERHUB_TOKEN
(generate your token)DOCKERHUB_USERNAME
HOST
(becomes available after running terraform script)KEY
(private SSH key)PORT
(by default it's22
)USERNAME
(by default Digital Ocean sets it toroot
)- All environment variables from
.env
file.
- Use
FIREBASE_STORAGE_BUCKET
variable ingcloud firestore export
- Get firebase service account credentials - https://console.firebase.google.com/u/0/project/{FIREBASE_PROJECT_ID}/settings/serviceaccounts/adminsdk
- Install
firestore-export
package to convert DB injson
.
gcloud firestore export gs://example.appspot.com
npm install -g node-firestore-import-export
firestore-export --accountCredentials firebase-adminsdk.json --backupFile myDatabase.json
Alternatively navigate to Google Cloud Storage.