gitpitch/docs/desktop/launch.md

8.2 KiB

GitPitch Desktop Launch

!> Docker Desktop must already be installed locally in order to launch GitPitch Desktop.

This guide assumes that you have successfully downloaded the desktop app. The following desktop app launch options are available:

Use the Docker Dashboard

?> To use the Docker Dashboard you must install or update to Docker Desktop 2.2 or later. You can download the latest release of Docker Desktop here.

The Docker Dashboard provides an intuitive UI that you can use to manage and launch GitPitch Desktop. For users that prefer to work in a UI this is the recommended approach for launching GitPitch Desktop.

If you prefer to work at the command line go directly to the bash alias launch instructions.

The following short video introduces Docker Dashboard and demonstrates how it can be used to quickly launch GitPitch Desktop:

While the video demonstrates the set of steps to launch GitPitch Desktop the following screenshot is provided as a quick reference for the main settings described in the video:

Screenshot showing the Docker Desktop Dashboard

The settings labeled in the above screenshot are described as follows:

  1. The Container Name describes the purpose of a collection of slide decks in a specific directory.
  2. The Local Host must always be set to 9000.
  3. The Host Path points to a local file system directory that contains your presentation files.
  4. The Container Path must always be set to /repo.
  5. After specifying values for these settings, create a container instance by clicking Run.

As noted in the video you can define multiple container instances for GitPitch Desktop. Each instance corresponds to a specific directory on your local file system where your slide decks are found.

You can easily switch between these instances to work on different slide decks in different directories. Just remember to stop any running instance before attempting to start a new desktop instance.

Use a Bash Alias

The simplest way to launch the desktop app using the command line is to create a simple bash alias or equivalent for your preferred shell.

** 4.0 Trial **

# Add GitPitch launch alias to your ~/.bashrc
alias gpd='docker run -it -v $PWD:/repo -p 9000:9000 gitpitch/trial'

** 4.0 Pro **

# Add GitPitch launch alias to your ~/.bashrc
alias gpd='docker run -it -v $PWD:/repo -p 9000:9000 gitpitch/4.0'

** 3.0 Pro **

# Add GitPitch launch alias to your ~/.bashrc
alias gpd='docker run -it -v $PWD:/repo -p 9000:9000 gitpitch/desktop:pro'

Once this alias is activated in your local shell environment, for example (source ~/.bashrc), you can launch the desktop app in two simple steps:

  1. Change directory into a local working directory
  2. Then execute your custom alias to launch the deskstop app, for example:
$ cd {LOCALWORKINGDIRECTORY}
$ gpd

[info] GitPitch Desktop 4.0 Pro Edition started.
[info] BUILD Thu Sep 6 19:00:24 UTC 2020
[info] EVENT directory watcher detected 212 files in 709 ms.
[info] MARKDOWN ( GFM - Widgets ) service enabled.
[info] LAYOUT ( Grid - Auto ) service enabled.
[info] DIAGRAMS ( Mermaid - PlantUML - Cloud ) service enabled.
[info] WHITEBOARD ( Excalidraw ) service enabled.
[info] COMPRESSION ( JPG - PNG - GIF ) service enabled.
[info] SPEAKER ( Window - Notes - Remote ) service enabled.
[info] PUBLISHING ( Offline - PDF - PPTX - HTML ) service enabled.
[info] PUBLISHING ( Online - Public - Private - Password ) service enabled.
[info] Application started (Prod)
[info] Listening for HTTP on /0.0.0.0:9000

Note, {LOCALWORKINGDIR} is a placeholder. You must replace it with a path to a working directory on your local file system. The directory must exist. It can be empty. Or it can contain existing presentation files and assets.

?> The {LOCALWORKINGDIR} is often the root directory of a local Git repository. But the directory does not have to be a Git repository. Any regular directory on your local file system can be used.

Upon successful launch you can access the desktop app in your browser at the following URL:

http://localhost:9000/gitpitch

To open your browser at this default desktop URL right now, click http://localhost:9000.

Use Docker Run

You can launch the desktop app from any directory using the following docker run command directly:

** 4.0 Trial **

docker run -it -v {LOCALWORKINGDIR}:/repo -p 9000:9000 gitpitch/trial

** 4.0 Pro **

docker run -it -v {LOCALWORKINGDIR}:/repo -p 9000:9000 gitpitch/4.0

** 3.0 Pro **

docker run -it -v {LOCALWORKINGDIR}:/repo -p 9000:9000 gitpitch/desktop:pro

Note, {LOCALWORKINGDIR} is a placeholder. You must replace it with an absolute path to a working directory on your local file system. The directory must exist. It can be empty. Or it can contain existing presentation files and assets.

?> The {LOCALWORKINGDIR} is often the root directory of a local Git repository. But the directory does not have to be a Git repository. Any regular directory on your local file system can be used.

Upon successful launch you can access the desktop app in your browser at the following URL:

http://localhost:9000/gitpitch

To open your browser at this default desktop URL right now, click http://localhost:9000.

Use Docker Compose

You can use the docker-compose command as a convenient alternative to docker run. To use Compose you first need to copy and save the following service description into a file on your local disk:

** 4.0 Trial **

version: '3'
services:
  gitpitch:
    image: gitpitch/trial
    volumes:
      - .:/repo
    ports:
      - "9000:9000"
    environment:
      - PORT=9000
      - SWEEP=false

** 4.0 Pro **

version: '3'
services:
  gitpitch:
    image: gitpitch/4.0
    volumes:
      - .:/repo
    ports:
      - "9000:9000"
    environment:
      - PORT=9000
      - SWEEP=false

** 3.0 Pro **

version: '3'
services:
  gitpitch:
    image: gitpitch/desktop:pro
    volumes:
      - .:/repo
    ports:
      - "9000:9000"
    environment:
      - PORT=9000
      - SWEEP=false

Following Docker conventions, we recommend saving this service description into a file called docker-compose.yaml.

Now to launch the desktop app copy this file into a local working directory. The directory must exist. It can be empty. Or it can contain existing presentation files and assets. Then within that same directory, use the following launch command:

docker-compose up

Upon successful launch you can access the desktop app in your browser at the following URL:

http://localhost:9000/gitpitch

To open your browser at this default desktop URL right now, click http://localhost:9000.

Windows Launch Tips

If your version of Docker Desktop for Windows is using the new WSL 2 Backend the launch details provided above should have you up and running without problems.

However, if your version of Docker Desktop for Windows is using the older Hyper-V Backend you need to update your Docker Desktop file sharing settings to allow local directories on Windows to be shared with the GitPitch Desktop Linux container. It's easy to set this up. You can find details describing directory sharing under the File Sharing section in the following Docker for Windows Guide.