Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Completed Digital Ocean Deployment button/script #48

Merged
merged 6 commits into from
Oct 6, 2023
Merged
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
12 changes: 5 additions & 7 deletions .do/deploy.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@ spec:
name: jury
services:
- name: jury-service
- dockerfile_path: Dockerfile
dockerfile_path: Dockerfile
envs:
- key: JURY_NAME
- key: REACT_APP_JURY_NAME
scope: RUN_AND_BUILD_TIME
- key: JURY_ADMIN_PASSWORD
scope: RUN_AND_BUILD_TIME
type: SECRET
- key: MONGODB_URI
scope: RUN_AND_BUILD_TIME
type: SECRET
- key: EMAIL_HOST
scope: RUN_AND_BUILD_TIME
- key: EMAIL_PORT
Expand All @@ -20,8 +18,8 @@ spec:
scope: RUN_AND_BUILD_TIME
- key: EMAIL_PASSWORD
scope: RUN_AND_BUILD_TIME
type: SECRET
git:
branch: master
repo: https://github.com/acmutd/jury.git

repo_clone_url: https://github.com/acmutd/jury.git
instance_size_slug: basic-xxs
instance_count: 1
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ COPY ["client/package.json", "client/tailwind.config.js", "client/tsconfig.json"

ARG NODE_ENV=production
ARG REACT_APP_JURY_NAME
ARG REACT_APP_JURY_URL
ARG REACT_APP_HUB

RUN yarn install
Expand Down
51 changes: 50 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,56 @@

A project designed to create a new pairwise judging system using modern technologies aimed at optimizing the user experience of judges and admin users. See the inspiration for this project: [Gavel by anishathalye](https://github.com/anishathalye/gavel). Refer to [this excellent article](https://www.anishathalye.com/2015/03/07/designing-a-better-judging-system/) for more details on the underlying formulas of Gavel! The majority of our algorithm will be based off of research done in the field of [pairwise comparison](https://en.wikipedia.org/wiki/Pairwise_comparison).

# Deployment
# One Click Deploy!

[![Deploy to DO](https://www.deploytodo.com/do-btn-blue.svg)](https://cloud.digitalocean.com/apps/new?repo=https://github.com/acmutd/jury/tree/master&refcode=de08cdf58df3)

## 0. Set up MongoDB Atlas

MongoDB is a **free** NoSQL database that is hosted in the cloud! Their website has great instructions on how to quickly create an account and 100% lifetime free database, perfect for Jury: https://www.mongodb.com/docs/atlas/getting-started/.

Follow the instructions up to step 5: connect to your cluster. You will get a URI string that looks like `mongodb+srv://<username>:<password>@<something>.mongodb.net/?retryWrites=true&w=majority`, except \<username\>, \<password\>, and \<something\> should be filled in. You will need that for the environmental variables.

## 1. Resources

- Click Edit Plan
- Change plan to "Basic"
- Change Instance Size to "$5.00/mo -- Basic (512 MB RAM | 1 vCPU)"

Note that since Digital Ocean charges prorated, this will literally be like less than 20 cents a day.

## 2. Environmental Variables

Click on "edit" next to "jury-service" and fill in the env as follows:

- REACT_APP_JURY_NAME - Name of the app to display to the user (eg. HackUTD X Judging)
- JURY_ADMIN_PASSWORD - Password for the admin portal (suggestion: use 2 random words)
- MONGODB_URI - URI of MongoDB Atlas instance (see step 0)
- EMAIL_HOST - SMTP email host (see below)
- EMAIL_FROM - SMTP email sending from address (see below)
- EMAIL_PASSWORD - SMTP email password (see below)
- EMAIL_POST - 587

### Email hosting

If using Gmail SMTP:
- EMAIL_HOST = smtp.gmail.com
- EMAIL_FROM = gmail username
- EMAIL_PASSWORD = google app password

If using SendGrid SMTP:
- EMAIL_HOST = smtp.sendgrid.com
- EMAIL_FROM = sendgrid email sender
- EMAIL_PASSWORD = sendgrid API key

## 3. Info

You can change the start of the URL if you want:
- App Info > edit
- Change app name (URL will be <app_name><some_characters>.ondigitalocean.app)
- Click Next

# Deploy Manually

## Setup

Expand Down