Jump to content

Project Sharing Server Setup - Docker Container


Recommended Posts

  • Vectorworks, Inc Employee

Setting up and Understanding Project Sharing - Docker

 

What is Docker?
When it comes to understanding docker, think of a shipping container, and it's cargo.  The shipping container represents your main operating system (The host), and the cargo are containers (operating systems within the host)
This means you can have a number of different operating systems running within another operating system, and the two can communicate using specified means set by docker but are otherwise oblivious to one another.

An example of this is you can have Windows 10 running as a Docker Host and have an Ubuntu Linux system running as a container.  However will not need to worry to much about the inner workings of what docker is and how it works.  So let's jump into setting up Project Sharing

 

With your installer media you will have a zip file for the project sharing server.  Within that zip you will find installation instructions.  The point of this post is to expand on those instructions.

 

In order to follow these instructions you will:

Have access to the host you plan on deploying this software to (should be an always on machine)

Have Docker installed and running
Have some working knowledge of a command line, however nothing in here should be difficult to grasp

 

 


The Project Sharing Server Setup

 


Make sure you are connected to the host and have the project-sharing-server.tar copied to your host

 

Loading our Docker Image:

docker load -i ./project-sharing-server.tar

Breaking this down we are telling `docker` to `load` the `-i` input of `./project-sharing-server.tar` file

 

Confirm load is successful:

docker image ls -a

You should now se something like:

REPOSITORY               TAG       IMAGE ID       CREATED        SIZE
project-sharing-server   latest    657e01b1dc11   2 months ago   85.2MB


Running our container:
I will be running you through two variants of this command, one will be the command line and the other will be using a helpful tool called docker compose.  However in order to get up and running, only one method is required.

 

Via Command Line:

docker run -d --env L=1 --name ps-server -v /your/local/storage/location:/usr/psserverd/Projects -v /you/local/storage/for/logs:/usr/psserverd/log -p 22001:22001 project-sharing-server:latest

Let's reformat this into something easier to understand

docker run -d --env L=1 
    --name ps-server
    -v /your/local/storage/location:/usr/psserverd/Projects
    -v /you/local/storage/for/logs:/usr/psserverd/log 
    -p 22001:22001 
    project-sharing-server:latest

From the top down here is what we are doing:

  • We are telling `docker` to `run` a new container that is `-d` detached from our command window with the `env l=1` environment variable L equaling 1 for dockers logging of the container
  • Then we tell our container that we are attaching two volumes to our host noted by the `-v` followed by the location of the folder on the host FS then a colon to tell docker everything after that is the file system within our container 
    • an example of this could be -v C:\Storage\Projects:/usr/psserverd/Projects
    • So here we are storing all the files and folder that get created in /usr/psserverd/Projects on our C drive in Storage\Projects
    • The /usr/psserverd/Projects directory is the directory that usually contains your existing PFs, VWX, PDFs, PNGs, etc.
  • Next in order to connect to our new server we need to expose it to the outside world using the ports signified by the -p.  Now when we want to use this we connect to our host on port 22001 and it will pass the traffic to our container
    • Like our volumes, we have two parts, our host port and our container port.  Where the container port cannot change, we can change the host port.  so wee could say if we want to connect to our server on port 21035 we would type -p 21035:22001 then any time you want to connect to the project sharing server you would use your host IP with the port 21035
  • Last up in the image we are using, this is the image we loaded previously and all we do here is call it to be loaded

 

Via Docker Compose:
This is the method I personally prefer as it will mean that all your settings are saved to a file so you don't have to remember everything
This method uses a file called docker-compose.yaml, this will be a new blank file in your host that you will fill out with all the right information
A special note, the use of the YAML format means that spacing has meaning, so be sure to use the same spacing everywhere, I personally just press tab as you will see.

#docker-compose.yaml
version: "3.9"
services:
  ps-server:
    image: project-sharing-server:latest
    container_name: ps-server
    ports:
    - 22001:22001
    environment:
      l: 1
    volumes:
    - /path/to/host/project/storage:/usr/psserverd/Projects
    - /path/to/host/log/storage:/usr/psserverd/log

Now all we need to do is in the same directory as this new docker-compose.yaml file we type in

docker-compose up

 

After you have your container up and running you can check the status of it by running

docker container ls -a

Please note that these are not official instructions and is intended as a jumping off point with the most basic setup.  There's a vast amount of tutorials and documentation surrounding docker and how it operates.

  • Like 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...