rsvp.pizza

command module
v0.8.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 22, 2024 License: MIT Imports: 3 Imported by: 0

README

rsvp.pizza

rsvp.pizza is a web application for collecting RSVP's to your pizza parties. Your friends can select the days they want to come and enter their email address to receive a Google Calendar invite to the party.

Installing

Before installing rsvp.pizza, you'll need to get OAuth2 credentials for the Google Calendar API and create a Fauna database.

How to get calendar credentials
  1. Start here to create an OAuth Desktop Application.
  2. Download the credential and save as credentials.json
  3. Renew the token go run cmd/renew_calendar_credentials.go
  4. Copy the printed URL to your web browser and complete the steps to log in with your Google account.
  5. Copy the code from the final URL that you're redirected to on localhost that does not exist.
Create the Fauna Database
  1. Create a free Fauna account and create your pizza database.
  2. Create the collections.

fridays, a collection of documents that contain the dates of your pizza parties.

{
  "date": Time("2023-04-07T21:30:00Z")
}

friends, a collection of documents that contain your friends' contact information.

{
  "name": "Ted Lasso",
  "email": "believe@tedlasso.com"
}
  1. Create an all_emails index that allows the friends collection to be search by email. Create an all_fridays index that returns all the dates in the fridays collection. Create all_fridays_range index that returns all the dates and refs in the fridays collection.
  2. Create and download a database access key for your database.
Install the package
  1. Download the latest version
wget https://github.com/mpoegel/rsvp.pizza/releases/download/v0.1.0/rsvp.pizza_Linux_x86_64.tar.gz
  1. Create a pizza user.
sudo adduser pizza
  1. Unpack
sudo tar xzfv rsvp.pizza_Linux_x86_64.tar.gz -C /
  1. Adjust the environment variables and config file.
cp /etc/pizza/.env /etc/pizza/.env.prod
cp /etc/pizza/pizza.yaml /etc/pizza/pizza.prod.yaml
sudo vim /etc/pizza/.env.prod
sudo vim /etc/pizza/pizza.prod.yaml
  1. Adjust the nginx config.
cp /etc/pizza/nginx.conf /etc/nginx/sites-available/pizza.conf
sudo vim /etc/nginx/sites-available/pizza.conf
sudo ln -s /etc/nginx/sites-available/pizza.conf /etc/nginx/sites-enabled/pizza.conf
sudo systemctl reload nginx
  1. Start the pizza service.
sudo systemctl start pizza.service

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cmd
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL