Code Monkey home page Code Monkey logo

alumni-network-app's Introduction

INFO 257 Jobsearch App Setup

The Jobsearch app is a Flask webapp connected to a MariaDB database. This repository contains two Dockerfiles that create a container for each that are then linked together. The MariaDB database is populated with the schema and data from the .sql file, and the Flask app is a collection of webpages powered by logic and routes in the python file.

Create the MariaDB Container

  1. Create the MariaDB container from the Dockerfile in /mariadb-docker by navigating to that folder and running the terminal commands:
  • docker build -t mariadb-local .
  • docker run -d --name mariadb-jobsearch -p 3307:3306 -e MYSQL_ROOT_PASSWORD=mypass --mount type=volume,source=mysqlDB,target=/var/lib/mysql --mount type=bind,source="${PWD}"/datadir,target=/home/ --restart always mariadb-local
  • Adjust the host's port from 3307 if it's already mapped to another server

Create and Populate the Database

  1. Connect to the MariaDB database to your database client using the credentials specified during the run command (default usename:password | root:mypass)
  2. Run the jobsearch.sql file to create and populate the Jobsearching database

Create the Flask Image and Network

  1. Build the Flask image from the Dockerfile in the root directory by navigating to that folder and running the terminal command:
  • docker build -t python-flask .
  1. Now that the containers for the Flask app and MariaDB database are created, a network is necessary for them to communicate. In terminal fun the following commands:
  • docker network create --driver=bridge db-netwoork
  • docker network connect db-netwoork mariadb-jobsearch

Create and Use Jobsearch Webapp

  1. With the network set up, run the following command in terminal to create the Flask container:
  • docker run --name jobsearch-app -p 5000:5000 --mount type=bind,source="${PWD}"/webapp,target=/app --net db-netwoork python-flask
  1. Navigate to http://localhost:5000/ in your web browser to use the webapp

alumni-network-app's People

Contributors

93h avatar matthewlee222 avatar rishabhmeswani avatar

Stargazers

 avatar

Watchers

 avatar  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.