WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# For authenticating slack bot
JUMPSTART_API_KEYS=

TZ=America/New_York

# Don't need for local development
SENTRY_DSN=
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -139,3 +139,5 @@ dmypy.json
.pyre/

# End of https://www.gitignore.io/api/macos,python

.env
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ RUN pip install --no-cache-dir -r requirements.txt

COPY jumpstart jumpstart

EXPOSE 5000
EXPOSE 8080

RUN useradd jumpstart
RUN chown jumpstart /usr/local/jumpstart
RUN mkdir -p /usr/local/var
RUN chown jumpstart:jumpstart /usr/local/var
USER jumpstart

CMD ["gunicorn", "jumpstart:app"]
CMD ["sh", "-c", "gunicorn jumpstart:app --bind=0.0.0.0:8080 --access-logfile - --error-log - --capture-output --timeout=600"]
26 changes: 16 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,35 +9,41 @@ See it live [here](https://jumpstart.csh.rit.edu)!
This project uses [Python](http://nodejs.org), [Flask](https://npmjs.com), SQL, HTML/CSS, and Javascript.

1. Clone and cd into the repo: `git clone https://github.com/ComputerScienceHouse/Jumpstart`
2. Run `pip install -r requirements.txt`
2. Run `pip install -r requirements.txt` (or use docker)
3. Ask opcomm for secrets
- Google clients secret json
- The secrets package follows the directory structure:
src/
secrets/
client_secrets.json
4. Run `flask --app jumpstart run`
- Jumpstart API keys
4. Run `flask --app jumpstart run` (please use docker)
5. Results

Jumpstart expects the following environment variables to be defined:
```
FLASK_APP=jumpstart:App
JUMPSTART_API_KEYS=KEYS
JUMPSTART_API_KEYS=KEYS # For authenticating slack bot
TZ=TIMEZONE
SENTRY_DSN=LINK
SENTRY_DSN=LINK # Don't need for local development
```
## Docker

1. Ensure you are in the project root, then build the image locally with `docker built -t jumpstart .`
2. Run with the following: (Be sure to update env variables)
```
docker run \
-e FLASK_RUN_HOST=0.0.0.0 \
-e FLASK_APP=jumpstart:App \
-e JUMPSTART_API_KEYS=KEYS \
-e TZ=America/New_York \
-e SENTRY_DSN=LINK \
-e GUNICORN_CMD_ARGS="-b=0.0.0.0:5000" \
-p 8080:8080 \
-v ./secrets:/usr/local/jumpstart/secrets \
-p 5000:5000 \
jumpstart
```
```
3. You can also use a `.env` file:
```
docker run \
--env-file='.env' \
-p 8080:8080 \
-v ./secrets:/usr/local/jumpstart/secrets \
jumpstart
```