Skip to content

Instantly share code, notes, and snippets.

View zubair1024's full-sized avatar
🎯
Focusing

Zubair Ahmed zubair1024

🎯
Focusing
View GitHub Profile
mongodump --uri="<uri>" --gzip --archive=/opt/

Step 1 : Create Docker machines (to act as nodes for Docker Swarm) Create one machine as manager and others as workers

`docker-machine create --driver hyperv manager1`    
`docker-machine create --driver virtualbox manager1`

docker-machine:Error with pre-create check: “exit status 126” https://stackoverflow.com/questions/3... brew cask install virtualbox;

Create one manager machine

storage:
dbPath: /srv/mongodb/arb1/
journal:
enabled: true
systemLog:
destination: file
logAppend: true
path: /var/log/mongodb/arb1/arb1.log

Install Redis Server

  • The Redis packages are available under the default apt repository. For the installation of Redis on an Ubuntu VPS. Run below command from the terminal to install Redis on your machine:

sudo apt-get install redis-server

  • Next is to enable Redis to start on system boot. Also restart Redis service once.

sudo systemctl enable redis-server.service

Setup Nominatim using Docker

  • Download map layer

wget https://download.geofabrik.de/asia/gcc-states-latest.osm.pbf

  • Clone Repo

git clone https://github.com/zubair1024/dockerized-nominatim.git

  • Build the docker image

Setting up OSM tile server using Docker

  • Download map layers

wget https://download.geofabrik.de/asia/gcc-states-latest.osm.pbf

  • Make volume for osm data

docker volume create openstreetmap-data

Setting up OSRM backend using Docker

  • Download map layer from source

wget https://download.geofabrik.de/asia/gcc-states-latest.osm.pbf

  • Pre-process the extract with the car profile and start a routing engine HTTP server on port 5000

docker run -t -v "${PWD}:/data" osrm/osrm-backend osrm-extract -p /opt/car.lua /data/gcc-states-latest.osm.pbf

@zubair1024
zubair1024 / ecosystem.json
Created December 8, 2019 14:06
Running PM2 as a window service
{
"apps": [
{
"name": "web",
"script": "C:\\ws\\engineer\\titan-web\\app.js",
"args": [],
"cwd": "C:\\ws\\engineer\\titan-web",
"merge_logs": true,
"instances": 1,
"exec_mode": "cluster_mode",