Upsource 2017.2 Help

Docker installation

Before proceeding with the installation, make sure you have the latest version of Docker installed on your host machine.

1. Pull Upsource image

Pull an image of the latest Upsource version from the Docker Hub Repository:

docker pull jetbrains/upsource:<version> Where <version> is a full version number of an Upsource build.

2. Prepare folders

Create empty directories to store Upsource data, configuration, log, and backup files:

mkdir -p -m 750 <path to data directory> <path to logs directory> <path to conf directory> <path to backups directory>

These directories will be passed to the Upsource container as volumes.

It's recommended that you name the folders correspondingly:

  • data
  • config
  • logs
  • backups

The Upsource service runs inside the Docker container under a non-root account 13001:13001 (group:id). Give that account read/write permissions to access the directories you've created (Linux or Mac OS only):

chown -R 13001:13001 <path to data directory> <path to logs directory> <path to conf directory> <path to backups directory>

3. Run Upsource

Use the following command to run a container with Upsource server and map Upsource data volumes and port:

docker run -it --name <upsource-server-instance> \ -v <path to data directory>:/opt/upsource/data \ -v <path to conf directory>:/opt/upsource/conf \ -v <path to logs directory>:/opt/upsource/logs \ -v <path to backups directory>:/opt/upsource/backups \ -p <port on host>:8080 \ jetbrains/upsource:<version>

Where:

<upsource-server-instance> is a name you give to the container.

-v <path to data directory>:/opt/upsource/data maps the data directory in the container to the data directory you've created on the host machine in Step 2. The same mapping is set for the other directories: conf, logs, backups.

-p <port on host>:8080 this port mapping instructs your host machine to listen on <port on host> and propagate all traffic to port 8080 inside the Docker container.

Windows only: add the parameter -u root after -p <port on host>:8080.

jetbrains/upsource:<version> points to the correct image with the Upsource build.

Upsource service is started on {0.0.0.0:8080} inside the Docker container, and port 8080 is mapped to <port on host> you've specified. This way the service may be accessed from any machine that has network access to <port on host> of your host machine. For instance, if FQDN of the host machine is host.mydomain.com and the <port on host> is 7777, then the service will be available at http://host.mydomain.com:7777

4. Configure Upsource

On the first run, Upsource service will start with Configuration Wizard at the address mentioned above. Open your browser, enter the address and follow the steps described in Things to configure after the first start to complete the setup.

For automated installation purposes, you can skip the wizard, however you need to explicitly set base URL — the URL at which the Upsource service will be available to the end users.

To skip Configuration Wizard, run the following command before running Upsource (Step 3):

docker run -it -v <path to data directory>:/opt/upsource/data \ -v <path to conf directory>:/opt/upsource/conf \ -v <path to logs directory>:/opt/upsource/logs \ -v <path to backups directory>:/opt/upsource/backups \ -p <port on host>:8080 \ jetbrains/upsource:<version> \ configure \ -J-Ddisable.configuration.wizard.on.clean.install=true \ --base-url=http://upsource.mydomain.com:XXXX

Windows only: add the parameter -u root after -p <port on host>:8080.

If you ever need to change the base URL for your running Upsource instance, proceed as follows:

  1. Stop Upsource: docker exec <containerId> stop

  2. Run the following command:

    docker run -it -v <path to data directory>:/opt/upsource/data \ -v <path to conf directory>:/opt/upsource/conf \ -v <path to logs directory>:/opt/upsource/logs \ -v <path to backups directory>:/opt/upsource/backups \ -p <port on host>:8080 \ jetbrains/upsource:<version> \ configure --base-url=http://upsource.mydomain.com:XXXX

    Windows only: add the parameter -u root after -p <port on host>:8080.

  3. Start Upsource: docker start <containerId>

Containers that are run to configure your installation are disposable and can be safely removed afterwards with the docker rm command.

To see all stopped containers, run docker ps -a

Last modified: 20 November 2017