Skip to content

Gavin1937/Moon-Trek-CSULA

 
 

Repository files navigation

Moon Trek CSULA

Configuration

You need to configure individual app before launch/deploy this project.

  1. Configure client
    • You can skip this step when deploy with Docker or Docker Compose
  2. Configure python-server
  3. Configure server

Configuration for Docker Compose

If you want to deploy this project with Docker Compose, you need to put all the configuration files inside a folder data under the repository root.

  1. create a new folder data under this directory, and create following folder structure
./data
   ├─── python-server
   │    └─── config
   └─── server
        └─── config

You can use following commands to create all of them at once

  • Windows
mkdir data\python-server\config
mkdir data\server\config
  • MacOS & Linux
mkdir -p data/python-server/config
mkdir -p data/server/config
  1. Follow steps from last section to configure server & python-server

  2. Finally, put those configuration files into data folder, under their dedicated config folder. Note that, all the path in config files are path inside Docker containers, they are not the path in your host system. The template config file ended with .docker already configure all the path for you.

Deploy entire project with Docker Compose (Recommend)

  1. You need to create a .env file to configure Docker Compose
    • You can use .env.template as your foundation, here is an example:
APP_PORT=8080
BACKEND_SERVER="http://localhost:8888"
PYTHON_SERVER="http://localhost:5000"
MR_ENABLE_OPENCV_NONFREE="ON"
  • APP_PORT: project application port expose to the public
    • for reverse proxy deploy only
  • BACKEND_SERVER: backend server url, do not add trailing slash /
    • for normal deploy only
  • PYTHON_SERVER: python-server url, do not add trailing slash /
    • for normal deploy only
  • MR_ENABLE_OPENCV_NONFREE: whether to enable MoonRegistration OpenCV non-free registration algorithm (SURF) in the project. Learn more about the flag in this doc
  1. Build Docker images
  • You can use docker-compose file docker-compose.yml for normal deployment, this method will create multiple docker containers listenting to multiple ports
docker-compose -f docker-compose.yml build
  • You can use docker-compose file docker-compose-reverse-proxy.yml for reverse proxy deployment, this method will make the project only listen to one port
docker-compose -f docker-compose-reverse-proxy.yml build

Note: every time you change something you need to rebuild modified app

If you don't want to deploy the project with python-server, you can modify docker-compose.yml or docker-compose-reverse-proxy.yml file, and comment out moontrek-python-server section before building.

  1. Now, you can launch the project with:
  • normal deployment
docker-compose -f docker-compose.yml up -d
  • reverse proxy deployment
docker-compose -f docker-compose-reverse-proxy.yml up -d
  1. You can stop the project with:
  • normal deployment
docker-compose -f docker-compose.yml down
  • reverse proxy deployment
docker-compose -f docker-compose-reverse-proxy.yml down

Deploy app individually

  • Follow the documentation in each app

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Vue 51.9%
  • JavaScript 38.1%
  • Python 6.0%
  • Dockerfile 3.3%
  • HTML 0.7%