-
how to upgrade phoenix
mix archive.install hex phx_new 1.4.0
-
how to check phx version -
mix phx.new --version
-
how to build phoenix chat: https://github.com/dwyl/phoenix-chat-example
-
postgres GUI tool pgadmin4
This file contains hidden or 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
minikube start # start the kubernetes cluster | |
minikube dashboard # start the server that helps manage k8s cluster | |
kubectl create deployment hello-node --image=gcr.io/hello-minikube-zero-install/hello-node # create deployment | |
kubectl get deployments # get deployments | |
kubectl get pods # get pods | |
kubectl get events # log of all the events created. Events are created whenever the command is run (more or less) | |
kubectl config view # view the kubectl configuration | |
kubectl expose deployment hello-node --type=LoadBalancer --port=8080 # expose the pod to the public internet | |
kubectl get services # view the service just created by the above command | |
minikube service hello-node # maps some external random port to 8080 and exposes the service to finally get used |
This file contains hidden or 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 pytest | |
import os | |
import sys | |
import subprocess | |
@pytest.fixture(autouse=True) | |
def core_server_url(): | |
host = 'localhost' | |
port = '8003' | |
core_url = "http:{}:{}".format(host, port) |
This file contains hidden or 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
option_settings: | |
aws:elasticbeanstalk:container:python: | |
WSGIPath: main/wsgi.py | |
aws:elasticbeanstalk:application:environment: | |
STAGING: 1 | |
DJANGO_SETTINGS_MODULE: main.settings | |
container_commands: | |
01_migrate: | |
command: "source /opt/python/current/env && source /opt/python/run/venv/bin/activate && cd /opt/python/current/app && ./manage.py migrate" | |
leader_only: true |
This file contains hidden or 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
container_commands: | |
01_migrate: | |
command: "django-admin.py migrate" | |
leader_only: true | |
02_collecttatic: | |
command: "./manage.py collectstatic" | |
leader_only: true | |
option_settings: | |
aws:elasticbeanstalk:application:environment: | |
STAGING: 1 |
This file contains hidden or 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
option_settings: | |
aws:elasticbeanstalk:container:python: | |
WSGIPath: main/wsgi.py | |
aws:elasticbeanstalk:application:environment: | |
STAGING: 1 |
This file contains hidden or 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
"[python]": { | |
"editor.insertSpaces": true, | |
"editor.tabSize": 4 | |
}, | |
"[elixir]": { | |
"editor.insertSpaces": true, | |
"editor.tabSize": 2 | |
} |
This file contains hidden or 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
# stack - group of interrelated services dependent on each other |
This file contains hidden or 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
1. Each VPC has it's own DNS server. Each subnet also has it's DNS server | |
2. When you use VPC's DNS, it will first try to resolve the names, using the private hosted zones defined in Route53. | |
If not found, it will using the public DNS for name resolution | |
3. Buying Name and Hosting Name are two different things. | |
4. How DNS works: | |
There are dns servers for every domain. | |
It will start from last entry to the first entry. So if I want to resolve www.coverfox.com. It will first ask .com servers for | |
the entry corresponding to coverfox.com. In this case, it will find the godaddy server. Now godaddy has it's own nameservers | |
which routes ip address based on the records defined. | |
4. Every time, I define a public hosted zone in Route53, aws will assign specific set of name servers for name resolution for that zone. |
This file contains hidden or 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
# to create virtualmachines via docker | |
docker-machine create --driver virtualbox myvm1 | |
docker-machine create --driver virtualbox myvm2 | |
# to make one of the docker machines as swarm manager | |
docker-machine ssh myvm1 "docker swarm init --advertise-addr <myvm1 ip>" | |
# to make the other machine join the swarm | |
# this command is already provided in the output of docker swarm init | |
docker-machine ssh myvm2 "docker swarm join --token SWMTKN-1-04dj1n2u3r2ryipbw7s78jix3l9hpe9gsnpzisoavdydn0izol-b2biwtctehmshjbjr0e5asnwf 192.168.99.100:2377" |