Skip to content

Commit dd73193

Browse files
committed
fix(docs): add Docker deployment instructions
1 parent 2a1f269 commit dd73193

1 file changed

Lines changed: 37 additions & 6 deletions

File tree

README.md

Lines changed: 37 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,20 @@
22

33
[Documentation](https://github.com/kyleratti/a-centralized-mirror/wiki)
44

5+
- [a-centralized-mirror](#a-centralized-mirror)
6+
- [Example Posts](#example-posts)
7+
- [Subreddit Moderators](#subreddit-moderators)
8+
- [Bot Developers](#bot-developers)
9+
- [Integration](#integration)
10+
- [Installation](#installation)
11+
- [Docker Container](#docker-container)
12+
- [Setting Up](#setting-up)
13+
- [Standard Application](#standard-application)
14+
- [Prerequisites](#prerequisites)
15+
- [Setting Up](#setting-up-1)
16+
- [To Do](#to-do)
17+
- [And a standing ovation to...](#and-a-standing-ovation-to)
18+
519
Typically, subreddits want mirror links of submissions (typically video) to be stickied to the top of each thread so visitors can find working links without having to sift through potentially hundreds of comments themselves.
620

721
The **a-centralized-mirror** service maintains a single stickied comment with a list of links to each mirror. The sticky replies are locked to prevent users from replying directly to the comment and using it to make their comments appear at the top of the thread. Registered bots can post, update, or delete their links with this service at any time; the **a-mirror-bot** account will update the stickied comment accordingly. Here's a general overview of how it works:
@@ -53,11 +67,30 @@ This service is provided as a fun hobby and does not come with any SLA.
5367

5468
# Installation
5569

56-
## Prerequisites
70+
Note if this is the first time running the application, you will need to make the API call to add your bot with a unique token.
71+
72+
## Docker Container
73+
74+
This service is intended to be deployed via Docker container. For convenience, a `build/crontab.Dockerfile` and `build/web.Dockerfile` are included.
75+
76+
A `docker-compose.yml` file is also included and is the recommended way to start this application. The SQLite database will be stored in the container's `/data` folder, which is a volume automatically created by the `docker-compose.yml` file.
77+
78+
Ensure you set your environment variables appropriately. A `.env.example` file is included.
79+
80+
### Setting Up
81+
82+
1. Clone the repository
83+
2. Run `docker-compose up`
84+
85+
## Standard Application
86+
87+
**WARNING:** This method is largely untested as we deploy the service via Docker.
88+
89+
### Prerequisites
5790

5891
- NodeJS `v12` or newer
5992

60-
## Setting Up
93+
### Setting Up
6194

6295
1. Clone the repository
6396
2. Run `npm i` to install dependencies
@@ -68,16 +101,14 @@ This service is provided as a fun hobby and does not come with any SLA.
68101

69102
For production use, we highly recommend deploying via Docker and placing a reverse proxy in front of the application.
70103

71-
Note if this is the first time running the application, you will need to make the API call to add your bot with a unique token.
72-
73104
# To Do
74105

75106
- [ ] Add subreddit allowlist for each registered bot to enforce subreddit boundaries
76107
- [ ] Add tests via jest.js
77108
- [ ] Move documentation from the GitHub Wiki to Markdown folders `/docs`
78-
- [ ] Add more RESTful API with versioning
109+
- [ ] Add more RESTful-comforming API with versioning
79110
- [ ] Increase Elastic Search logging functionality
80111

81112
# And a standing ovation to...
82113

83-
I absolutely _cannot_ thank **[RoboPhred](https://github.com/robophred)** enough for this help with this project and every single project I've worked on for the past decade. Thank you so very much for your patience over the past _decade_ of mentorship you've provided me.
114+
I absolutely _cannot_ thank **[RoboPhred](https://github.com/robophred)** enough for the guidance and mentorship with this project and virtually every project I've worked on for the past decade.

0 commit comments

Comments
 (0)