## Prerequisite
- windows version must be 1809 and above.
- enable hyper-v and container on windows features 
- install docker for desktop on windows 
- go to icon tray on windows and right click on docker icon, then click on option 'switch to windows containers...' 
  * switching from linux to windows will restart docker, please wait until docker start again and then goto next step
- go to icon tray on windows and right click on docker icon, then click on 'settings'
- on the settings window, open the 'Daemon' tab and turn on 'advanced' option
- copy following setting into the configuration section and click on apply button on Daemon tab: 

```
{
  "registry-mirrors": [],
  "insecure-registries": [
    "repo.marcopacs.com"
  ],
  "debug": true,
  "experimental": false
}
```
 * changing docker Daemon settings will restart docker, please wait until docker start again and then goto next step


## Installation Guide

-  create a folder in the production server for example in the drive C(ex: D:/build)

-  navigate to created folder in previous step and create a file called docker-compose.yml (ex: D:/build/docker-compose.yml)

- open docker-compose.yml with an editor and paste following statements in the created docker compose file

```
version: '3'
services:
  app:
    container_name: karname-app
    restart: always
    image: repo.marcopacs.com/karname/karname-app
    ports:
      - '80:3000'
    depends_on:
      - mongo
    links: 
      - mongo
    environment:
      ROOT_URL: ${APP_ROOT_URL:-http://localhost}
      MONGO_URL: mongodb://mongo:27017/karname
      PORT: 3000
      METEOR_SETTINGS: '{"worklistUrl":"http://karname-broker"}'
  mongo:
    image: repo.marcopacs.com/karname/mongo-windows
    volumes:
      - D:\data\db:C:\data\db
volumes:
  data:
networks:
  default:
    external:
      name: nat
```

- navigate to Drive D and create a folder called "data"

- navigate to D:/data and create a folder called "db"

- open CMD

- CD to created folder in step 1 (ex: cd D:/build)

- login into repo.marcopacs.com with following command, in the following command, use your username and password that can login into repo.marcopacs.com:

    docker login -u username -p password repo.marcopacs.com


- run following command: 

    docker-compose up -d --force-recreate

- goto localhost