Giter Site home page Giter Site logo

blackshield6 / emerge-learning Goto Github PK

View Code? Open in Web Editor NEW

This project forked from medtech-berkeley/emerge-learning

0.0 0.0 0.0 32.36 MB

Online education platform for emergency medical technicians (EMTs).

Shell 0.57% JavaScript 33.82% Python 56.64% CSS 2.27% HTML 6.28% Dockerfile 0.41%

emerge-learning's Introduction

mtab-stanford-project

Main repository for Emerge, an online platform for emergency medicine education.

Building and Deploying

Compose helper script

There is a simple helper script provided named compose. This should work on Mac and Linux and could potentially work in Windows but this is untested. Alternatively, you can replace everywhere you see ./compose [CMD] with docker-compose -f docker-compose.yml -f local-compose.yml [CMD].

Building

To build run:

./compose build

You can verify that is runs properly by running

./compose up

And waiting for the Django startup line (Starting development server at http://0.0.0.0:8000/). IF there aren't any Python errors in the output then the configuration likely worked.

Building for Windows

There have been known issues with running this on Windows after cloning from the repo due to the difference in line endings between UNIX-based systems and Windows. To fix you can run the following command:

git config --global core.autocrlf false

After running this command, deleting and recloning the repo should fix the issue.

Local development environment

The local development server should allow you to mount your local directory into the server so you can modify and run code without having to rebuild every time.

To run a command locally you can do the following:

./compose [DOCKER_CMD_HERE]

To start up the server:

./compose up

To run it in detached mode, you can append a -d to the previous command and Docker will not block your terminal while running.

Note for Windows: If you followed the section above for building on Windows and you cannot connect to the development server, but it seems to be running properly, you are probably running Docker Toolbox and you need to forward the 80 port from the VM to your local computer. This is a decent guide on doing this: https://www.simplified.guide/virtualbox/port-forwarding

This is only necessary for the up and run commands. If you already have a container running (through up -d for example) you can use the following command to enter it:

./compose exec [SERVICE_NAME] [COMMAND]

For all of the following commands, the server must be up and running using the above instructions.s

Executing commands inside of the containers

For example to enter the interface (Django) server with a command prompt

./compose exec interfaceserver sh

To run a Django "manage.py" command

Or to run a manage.py command:

./compose exec interfaceserver ./manage.py [MANAGE.PY COMMAND]

To install a new npm package

Or to run a manage.py command:

./compose exec reactserver npm install [PACKAGE] --save

After running this, you can commit the new package.json and package-lock.json files.

emerge-learning's People

Contributors

sean-dooher avatar arjunsv avatar ethanteo99 avatar saahilchadha1 avatar hlillemark avatar adityanair99 avatar igalbraith27 avatar ivy314li avatar vagrawal787 avatar dlillemark avatar kevkang 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.