Sign inSign up

bmcgonag/qux-be

By bmcgonag

Updated about 1 year ago

Back End for Quant UX.

Image
1

10K+

bmcgonag/qux-be repository overview

Quant-UX for Docker

PLEASE NOTE: This image / container is dependent on the front-end image that I also maintain and build. It cannot be run stand-alone. The docker-compose.yml file shown below will help make sure you get everything needed to run this system.

Quant-UX is a great open source prototyping / mock-up application created by Klaus Schaefers.

I started working to make this into a dockerized application as a way to help encourage the continued development of the tool.

The DockerFiles use the smallest images I could find as a base, and the docker-compose is really setup to allow for the easiest deployment possible.

Docker-Compose Details

To use the docker-compose.yml file, you can download just the compose file with the command:

wget https://raw.githubusercontent.com/bmcgonag/quant-ux-docker/main/docker-compose.yml

Or, you can clone the repository with the command

git clone https://github.com/bmcgonag/quant-ux-docker.git

Docker-Compose Environment Variables

You'll want to make a few modifications to some of the environment variables.

ENVExampleAbout
QUX_PROXY_URLhttp://quant-ux-backend:8080This value should not be changed unless you change the container name for the back end, or the QUX_HTTP_PORT environment variable.
QUX_HTTP_HOSThttp://quant-ux-frontend:8082This value should not be changed unless you change the container name for the front end. DO NOT Change the port number as it is where the container port is set.
QUX_HTTP_PORT8080The port where the backend service runs
QUX_MONGO_DBquantuxThe name of the mongo database to be used by the application
QUX_MONGO_TABLEquantuxThe name of the mongo table prefix to be used by the application
QUX_MAIL_USER[email protected]The username for your smtp server
QUX_MAIL_PASSWORDpa%%W0rD!The password for your smtp server user
QUX_MAIL_HOSTmail.example.com or smtp.example.comThe host url of your smtp server
QUX_JWT_PASSWORDsome-long-string-of-mix-case-chars-and-numsThis is a java web token secret, and should be a very long password. You can use the generator at https://jwt.io/ and select RS256 for a very strong token. Never share this token with anyone.
QUX_IMAGE_FOLDER_USER/qux-imagesA folder path for image storage in the container.
QUX_IMAGE_FOLDER_APP/qux-image-appA folder path for image app storage in the container
TZAmerica/Chicago, Europe/LondonYour local timezone value. You can find your's with this list https://www.php.net/manual/en/timezones.php
Docker Compose Port Mappings
Port HostPort ContainerPort Use
80828082This port is the port you'll use to access the application once it's up and running
Docker Compose Volume Mapping
Host FolderContainer FolderVolume Use
./data/data/dbThis volume is where the mongodb data is stored. It's wise to backup this folder to another system, or external storage in case of catastrophic events.

Compose File

version: '3'

services:
  mongo:
    restart: always
    container_name: quant-ux-mongo
    image: mongo
    volumes:
      - ./data:/data/db        # pth for the data to be stored and kept on your host machine is on the left side of the ":"
  qux-fe:
    restart: always
    container_name: quant-ux-frontend
    image: bmcgonag/qux-fe
    environment:
      - QUX_PROXY_URL=http://quant-ux-backend:8080        # this is the path the front end uses to talk tot he backend
    links:
      - mongo
      - qux-be
    ports:
      - 8082:8082        # change the left side port if your host machine already has 8082 in use
    depends_on:
      - qux-be
  qux-be:
    restart: always
    container_name: quant-ux-backend
    image: bmcgonag/qux-be
    environment:
      - QUX_HTTP_HOST=http://quant-ux-frontend:8082        # this is the path the backend uses to talk to the front end
      - QUX_HTTP_PORT=8080        # This is the port the backend will use
      - QUX_MONGO_DB_NAME=quantux        # the database / collection name in mongodb
      - QUX_MONGO_TABLE_PREFIX=quantux        # table / document prefix in mongodb
      - QUX_MONGO_CONNECTION_STRING=mongodb://quant-ux-mongo:27017        # this assumes your mongodb container will be called "quant-ux-mongo" in the docker-compose file
      - [email protected]        # this should be your smtp email user
      - QUX_MAIL_PASSWORD=sTr0ngPa55w0Rd        # this should be your smtp email password
      - QUX_MAIL_HOST=mail.example.com        # this should be your smtp host address
      - QUX_JWT_PASSWORD=some-long-string-of-mix-case-chars-and-nums        # you should change this to a real JWT secret
      - QUX_IMAGE_FOLDER_USER=/qux-images        # just a folder name, change if you like
      - QUX_IMAGE_FOLDER_APPS=/qux-image-apps        # just a folder name, change if you like
      - TZ=America/Chicago        # change to your timezone
    depends_on:
      - mongo

Tag summary

Content type

Image

Digest

sha256:6a471b0b3

Size

391.3 MB

Last updated

about 1 year ago

docker pull bmcgonag/qux-be