Code Monkey home page Code Monkey logo

work-roster-app's Introduction

INFS3208 Project - Work Roster App

This is a speedran project for INFS3208. It is a roster / availability sharing application.

Login

Register

Create a shift

Day View

Week View

Month View

Agenda View

Project Architecture

  • Database: MongoDB
  • Backend: Nodejs Express Server. Backend is accessed through the reverse proxy set up by the Nginx server on the frontend.
  • Frontend: Typescript ReactJS. Frontend container is a multi-stage build which runs an nginx server with the static compiled application files.

Set Up / Installation

Docker Swarm Usage

Set up 3 nodes in a swarm

SSH into manager node and install docker-compose on manager:

sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose

Create temporary image registery:

docker service create --name registry --publish published=5000,target=5000 registry:2

Build the custom images:

docker-compose -f docker-compose-swarm.yml build

Push custom app images to registery:

docker-compose -f docker-compose-swarm.yml push

Create network:

docker network create --scope=swarm --driver=overlay   --subnet=172.22.0.0/16 --gateway=172.22.0.1 app-network

Deploy:

docker stack deploy --compose-file docker-compose-swarm.yml workrosterapp

Initalising swarm On manager node:
docker swarm init --advertise-addr $(hostname -i)
On worker nodes:
docker swarm join --token [token from above command] [external IP]:2377

Exiting swarm

docker stack rm workrosterapp
docker service rm registry
docker network rm app-network
docker swarm leave --force

Docker-compose Usage

Building images

cd Work-Roster-App
docker-compose build

Starting containers

docker-compose up

Stoping containers

docker-compose down -v

work-roster-app's People

Contributors

samantha-tran avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.