raunak-r / tech-notes

A repository to store code snippets, general functions, and any other notes taken for various technologies and tools. See ISSUES Tab for in-depth studies.
2 stars 0 forks source link

Git | Docker | Jenkins | Nginx | Deployments #6

Open raunak-r opened 4 years ago

raunak-r commented 4 years ago

GIT

Setting up SSH

  1. Setup ssh over https
  2. Setup ssh keys for git repo
raunak-r commented 4 years ago

DOCKER

Optimizations

Commands

Docker UI

docker run -d -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer And point your browser to http://localhost:9000.

Study Notes

. -d arg to run container in background. . see running images, stopping containers. . network equal host mode to access local ips. . putting env variables in dockerfile. . connecting to local psql from docker instance

raunak-r commented 4 years ago

JENKINS

raunak-r commented 4 years ago

Nginx

> user  nobody nogroup;
https://serverfault.com/a/901176

> Use sudo nginx -t to test the complete configuration file, which starts at nginx.conf and pulls in additional fragments using the include directive. See this document for more.

/etc/nginx/
> sudo nginx -t -c /etc/nginx/nginx.conf

# logs
> /usr/local/var/log/nginx/*
> tail -f /var/log/nginx/error.log
> tail -f /var/log/nginx/access.log /var/log/nginx/error.log

# angular routing
> https://stackoverflow.com/questions/35038155/how-to-redirect-all-angular-request-to-index-html-in-nginx
raunak-r commented 4 years ago

Kubernetes

raunak-r commented 4 years ago

Deployments

roadmap