Sign inSign up

biltudas1/mindmile

By biltudas1

Updated about 1 year ago

A microservice based quiz application

Image
0

5.4K

biltudas1/mindmile repository overview

Dockerfile

Table of Contents

Setup

Downloading Source Code
  • Clone this repo using HTTP or SSH
git clone --recurse-submodules https://gitlab.com/mindmile/dockerfile.git
git clone --recurse-submodules [email protected]:mindmile/dockerfile.git
  • Update the submodules (Optional)
git submodule update --remote --merge
Building the Docker Image
docker buildx build -t <docker_image_name:tag_name> .
Setting up the databases (If not ready)
  • Install neo4j python package
pip install neo4j==5.28.1
  • Run the python script, and follow the steps accordingly
python database.py
Generate token.json
  • Download credentials.json from Google Cloud
  • Keep it in the root of this repo
  • Install the python dependencies
pip install -r requirements.txt
  • Run the gen_token.py and do authentication in your web browser
python gen_token.py
  • If everything works perfectly then token.json will be generated

Environment Variables

NameDescription
WEB_APP_SENDER_MAILThe email address from where the Application will send important notifications
PORTThe port where the Web Application will be run
NEO4J_SERVER_URIThe URI of the Neo4J server
NEO4J_DB_USERNAMEThe username of the Neo4J Database
NEO4J_DB_PASSWORDPassword of the Neo4J Database
REDIS_URIThe connection URI of the Redis Server
ADMIN_EMAILSThe email address list of the Admin, Seperated by spaces
CREDENTIALSContent of the credentials.json encoded using Base64 algorithm
TOKENContent of the token.json encoded using Base64 algorithm

Sample Docker Compose

services:
  mindmile:
    image: <image_name>:<tag>
    container_name: mindmile
    ports:
      - '<host_port>:<container_port>'
    environment:
      WEB_APP_SENDER_MAIL: '<email_address>'
      PORT: <container_port>
      NEO4J_SERVER_URI: '<connection_uri_of_Neo4j>'
      NEO4J_DB_USERNAME: '<neo4j_username>'
      NEO4J_DB_PASSWORD: '<neo4j_password>'
      REDIS_URI: '<redis_connection_uri>'
      ADMIN_EMAILS: '<email_of_admin1> <email_of_admin2> ...'
      CREDENTIALS: '<base64_encoded_credentials>'
      TOKEN: '<base64_encoded_token>'

Tag summary

Content type

Image

Digest

sha256:830546379

Size

135 MB

Last updated

about 1 year ago

docker pull biltudas1/mindmile