Giter VIP home page Giter VIP logo

uosu-petition's Introduction

Status

python deploy

Getting Started

Run the installation script with the optional hooks

$ ./install --hooks

Make sure you add upetition.local to your /etc/hosts file so it routes you correctly.

Running with docker

To run the full application with docker, you must start the frontend, backend, and router containers.

First, copy the .flaskenv.example and .env.example files to .flaskenv and .env respectively. Set the variables in those files as you need them.

NOTE The PORT variable needs to match the port that is being proxied for the frontend server. Similarly, the FLASK_RUN_PORT variable needs to match for the port that is being proxied for the backend server

Next, build the containers with docker. You can build the containers individually or use the Make commands that have been added for this

$ docker-compose -f docker/docker-compose.yml build  # builds all of them
$ docker-compose -f docker/docker-compose.yml build frontend backend router # same as above
$ docker-compose -f docker/docker-compose.yml build frontend # build just the frontend container

Finally, run the containers. It is recommended if you are debugging the Python application that you start up the backend container individually with docker-compose -f docker/docker-compose.yml run backend so any breakpoints in the code allow you to interact with it on the terminal.

$ docker-compose -f docker/docker-compose.yml up frontend router # Either run in a different terminal or run with -d
$ docker-compose -f docker/docker-compose.yml run backend

Finally, open your browser and go to upetition.local to see the website!

Next Steps

Adding a New Page

  1. Create a folder in /src/components with your react components.
  2. Add a route for your page to /src/App.js.
  3. Add a button to the navigation bar in /src/components/NavBar/index.js.

File Structure

The front-end is based on create-react-app.

The back-end is based on Flask.

Additional Documentation

uosu-petition's People

Contributors

cryptaliagy avatar duderandom21 avatar obenn avatar amahanna avatar benjeau avatar dependabot[bot] avatar

Watchers

James Cloos 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.