Skip to content

Commit

Permalink
updated README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
saubhik committed Apr 13, 2020
1 parent d9b39e7 commit 3a1f36e
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 0 deletions.
Binary file added .DS_Store
Binary file not shown.
55 changes: 55 additions & 0 deletions DEPLOY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Deployment

Currently, I am running this is AWS EC2 instance (free tier).

The steps are outlined in the `README.md`.

You need to have these env vars present in your env before doing make build.
```bash
FROM_ADDR=...
EMAIL_PASSWORD=...
URL=https://www.bigbasket.com/pd/241600/tata-salt--iodized-1-kg-pouch/
```
These are the email id and the password for the account used by the service to send delivery alerts.
I use the above `URL` to check whether there are slots (since I think salt is super important :P).
So you can keep the `URL` as it is.

Add a `subscribers.json` file which is of the format:
```json
[
{
"city": "xyz1",
"area": "xyz1",
"email": "xyz1@abc.com"
},
{
"city": "xyz2",
"area": "xyz2",
"email": "xyz2@abc.com"
}
]
```
You can add as many subscribers as you like (ideally `~5`, since currently there is no concurrency). Alerts will be sent to these emails.

Note that the area string should be something which has a suggestion in the drop down, and the first suggestion is selected. For example:
If `area="Bellandur Lake"`, then we are actually sending `Bellandur Lake Rd-560103, Bangalore` to the server as shown:

![79089409-0b2d6900-7d81-11ea-94cb-b68ce72a7da6](./screenshots/79089409-0b2d6900-7d81-11ea-94cb-b68ce72a7da6.png)

*So make sure you add an `area` string for which BigBasket gives the right first suggestion which is where you want to check the slots for.*

After the above 2 steps, just do `make build`.

In AWS EC2, I need to download the zip of this repo & unzip first:

```bash
wget https://github.com/saubhik/bb-slotter/archive/master.zip
unzip master.zip
```
before running the build.

Note that you might need to install docker in the EC2 instance - you can check the docs here.

After building the image, run the image using `make run`.

That's it.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ Easily extensible to:
- support multiple email recipients
- support multiple cities and pin codes

For more details on hosting the app, read [here](DEPLOY.md).

## `bb-slotter` in action

Docker container running in AWS EC2 instance:
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3a1f36e

Please sign in to comment.