- Install Docker
- Install Docker Compose
- Install SQLite Database (Optional)
sudo apt-get install sqlite3
- Install Nginx
Editserver
block in /conf/nginx.conf to configure Nginxlisten 80; listen [::]:80; server_name mmflow.mehtasanket-dev.in; location / { proxy_pass http://localhost:8080; }
- Install nodejs, npm
curl -sL https://deb.nodesource.com/setup_6.x | sudo bash - sudo apt-get install -y nodejs sudo apt-get install -y npm
- Start Nginx:
start nginx
- Run containers:
./local-run.sh
Access the site at http://mmflow.mehtasanket-dev.in/
- Create new VM on GCP (Google cloud platform)
sudo apt-get update
- VPC Network > External IP addresses
- Cloud DNS > add record set > setup external IP address
(https://www.linode.com/docs/web-servers/nginx/how-to-install-nginx-ubuntu-18-04/)
sudo apt-install nginx
vim /etc/nginx/sites-available/mehtasanket.in
server { listen 80; server_name mmflow.mehtasanket.in; location / { proxy_pass "http://127.0.0.1:8080"; } } server { listen 80; server_name mmflow-backend.mehtasanket.in; location / { proxy_pass "http://127.0.0.1:8090"; } }
sudo ln -s /etc/nginx/sites-available/mehtasanket.in /etc/nginx/sites-enabled/
sudo nginx -t
# To verify rulessudo nginx -s reload
# To reload rulessystemctl status nginx
(https://linuxhint.com/install_sqlite_browser_ubuntu_1804/)
sudo apt-get install sqlite3
- (One time)
git clone https://github.com/mehtasankets/mmflow.git
cd mmflow
git pull
- (One time)
cp prod-env.list-tmpl prod-env.list
- (One time) Edit prod-env.list to populate environment variables
- Run db query versions if any
docker-compose down
./run.sh
Run following command on powershell
pscp -P 22 -scp -i C:\work\personal\OracleCloud\for-putty.ppk ubuntu@<IP_ADDRESS>:/home/ubuntu/databases/expenses.csv .