Skip to content

Latest commit

 

History

History
72 lines (58 loc) · 1.35 KB

README.md

File metadata and controls

72 lines (58 loc) · 1.35 KB

Oteemo Blog

Sample React, Flask, and MongoDB blog application for use in Platform One Big Bang

Disclaimer / Warning

This is a demo application. It is incomplete and intended for training. NOT to be used in production.

Roadmap

  • containerize each part of the app
    • frontend
    • backend
    • db
  • skipping docker-compose
  • orchestrate with kubernetes

Installation

frontend

LEGACY INSTALL

cd frontend
npm install
npm start

NEW INSTALL

cd frontend
docker build -t frontend:1.0 .
docker run --name react -p 3000:3000 frontend:1.0

backend

LEGACY INSTALL

cd backend
pipenv install --ignore-pipfile
pipenv shell
python api/api.py

NEW INSTALL

cd backend
docker build -t backend:1.0 .
docker container run --name flask -p 5001:5001 backend:1.0

db

LEGACY INSTALL

docker run --name mongodb -d -p 5000:27017 mongo
# use mongosh to init BlogDB
mongosh localhost:5000
> use BlogDB
> db.posts.insertOne({'author':'jedi', 'date': 'whatevadate', 'title':'coolstring', 'posts':'body of msg'})

NEW INSTALL

cd db
chmod +x install.sh
./install.sh

NOTE: Database is ephemeral, initialized with fixture data upon container creation via install script for demonstration purposes. We could mount a local directory or just implement StatefulSet down the line.