Skip to content

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

Notifications You must be signed in to change notification settings

Oteemo/oteemo-blog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published