Skip to content

Commit f6216ad

Browse files
committed
Update release process to use semver
1 parent 684383d commit f6216ad

File tree

5 files changed

+149
-220
lines changed

5 files changed

+149
-220
lines changed

.env.example

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1+
MONITORSS_VERSION=7
2+
13
BOT_PRESENCE_DISCORD_BOT_TOKEN="BOT_TOKEN_HERE"
24
BOT_PRESENCE_STATUS="online"
35
BOT_PRESENCE_ACTIVITY_TYPE=""
46
BOT_PRESENCE_ACTIVITY_NAME=""
7+
BOT_PRESENCE_ACTIVITY_STREAM_URL=""
8+
BOT_PRESENCE_DISCORD_BOT_CLIENT_ID="BOT_CLIENT_ID_HERE"
59

610
BACKEND_API_MONGODB_URI=mongodb://mongo:27017/rss
711
BACKEND_API_DEFAULT_REFRESH_RATE_MINUTES=10

.github/workflows/release.yml

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ jobs:
6464
tags: |
6565
type=semver,pattern={{version}}
6666
type=semver,pattern={{major}}.{{minor}}
67+
type=semver,pattern={{major}}
6768
6869
- name: Set up QEMU
6970
uses: docker/setup-qemu-action@v3
@@ -110,33 +111,7 @@ jobs:
110111
echo "PRERELEASE=false" >> $GITHUB_OUTPUT
111112
fi
112113
113-
- name: Generate merged docker-compose.yml
114-
run: |
115-
# Create empty env file to satisfy docker compose config
116-
touch .env.prod
117-
118-
# Merge base + prod into single file, resolving all extends
119-
docker compose -f docker-compose.yml config > docker-compose-merged.yml
120-
121-
# Replace :main with version tag
122-
sed -i 's/:main/:${{ steps.version.outputs.VERSION }}/g' docker-compose-merged.yml
123-
124-
# Add env_file directive back to services that need it
125-
# (docker compose config removes it, but users need to provide their own .env.prod)
126-
sed -i '/^ bot-presence-service:$/a\ env_file:\n - .env.prod' docker-compose-merged.yml
127-
sed -i '/^ discord-rest-listener-service:$/a\ env_file:\n - .env.prod' docker-compose-merged.yml
128-
sed -i '/^ feed-requests-service:$/a\ env_file:\n - .env.prod' docker-compose-merged.yml
129-
sed -i '/^ feed-requests-postgres-migration:$/a\ env_file:\n - .env.prod' docker-compose-merged.yml
130-
sed -i '/^ user-feeds-service:$/a\ env_file:\n - .env.prod' docker-compose-merged.yml
131-
sed -i '/^ user-feeds-postgres-migration:$/a\ env_file:\n - .env.prod' docker-compose-merged.yml
132-
sed -i '/^ legacy-feed-bulk-converter-service:$/a\ env_file:\n - .env.prod' docker-compose-merged.yml
133-
sed -i '/^ schedule-emitter-service:$/a\ env_file:\n - .env.prod' docker-compose-merged.yml
134-
sed -i '/^ monolith:$/a\ env_file:\n - .env.prod' docker-compose-merged.yml
135-
136-
# Rename for release
137-
mv docker-compose-merged.yml monitorss-${{ steps.version.outputs.VERSION }}.yml
138-
139-
- name: Create release with compose file
114+
- name: Create release
140115
env:
141116
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
142117
run: |
@@ -145,7 +120,6 @@ jobs:
145120
PRERELEASE_FLAG="--prerelease"
146121
fi
147122
gh release create ${{ github.ref_name }} \
148-
monitorss-${{ steps.version.outputs.VERSION }}.yml \
149123
--generate-notes \
150124
--draft \
151125
$PRERELEASE_FLAG

README.md

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Delivers highly-customized news feeds to Discord!
1010
- [Enable Email Notifications](#enable-email-notifications)
1111
- [Enable Reddit Authorizations](#enable-reddit-authorizations)
1212
- [Updating](#updating)
13+
- [Major Version Updates](#major-version-updates)
1314
- [Migrating from v6](#migrating-from-v6)
1415

1516
## Get Started
@@ -32,8 +33,8 @@ Docker is required to easily coordinate and run multiple services at once.
3233
2. Install [Docker Compose](https://docs.docker.com/compose/install/)
3334
3. Clone this repo's `main` (the default) branch - `git clone https://github.com/synzen/MonitoRSS.git`
3435
4. Create a Discord application through [Discord's developer portal](https://discord.com/developers/applications) if you do not already have one
35-
5. Create a copy of the existing `.env.example` file and rename it to `.env.prod`
36-
6. Replace all relevant values in the `.env.prod` file with your own values
36+
5. Create a copy of the existing `.env.example` file and rename it to `.env`
37+
6. Replace all relevant values in the `.env` file with your own values
3738
1. If you have your own MongoDB instance, set `BACKEND_API_MONGODB_URI` to your MongoDB URI
3839
2. Add your email at the end of `FEED_REQUESTS_FEED_REQUEST_DEFAULT_USER_AGENT` for feed hosts to be able to contact you if you violate their usage policies. For example, `MonitoRSS [Self-Hosted]/1.0 [email protected]`.
3940
3. Replace all instances of "BOT_TOKEN_HERE" with your Discord bot application token
@@ -51,7 +52,7 @@ Docker is required to easily coordinate and run multiple services at once.
5152
#### Customize Site Domain
5253

5354
1. Set up your domain to point to the server running the control panel on localhost
54-
2. Update all references to `http://localhost:8000` in your `.env.prod` to your desired domain. For example, `https://mynewdomain.com`.
55+
2. Update all references to `http://localhost:8000` in your `.env` to your desired domain. For example, `https://mynewdomain.com`.
5556
3. Add `{DOMAIN_HERE}/api/v1/discord/callback-v2` to the list of redirect URIs in your Discord application in the OAuth2 page, replacing `{DOMAIN_HERE}` with the value you set in step 1
5657

5758
#### Enable Email Notifications
@@ -69,19 +70,24 @@ Make sure to opt into email notifications in the control panel's user settings p
6970

7071
1. Create a Reddit application at https://www.reddit.com/prefs/apps as a "web app".
7172
2. Add `{DOMAIN_HERE}/api/v1/reddit/callback` to the list of redirect URIs in your Reddit application settings, replacing `{DOMAIN_HERE}` with your domain that you're using to access the control panel.
72-
3. Copy the redirect URI you just added and set it as `BACKEND_API_REDDIT_REDIRECT_URI` in your `.env.prod` file.
73-
4. Copy the Reddit application's client ID (under "web app" label) and set it as `BACKEND_API_REDDIT_CLIENT_ID` in your `.env.prod` file.
74-
5. Copy the Reddit application's secret and set it as `BACKEND_API_REDDIT_CLIENT_SECRET` in your `.env.prod` file.
75-
6. Generate a random 64-digit hexadecimal string and set it as `BACKEND_API_ENCRYPTION_KEY_HEX` in your `.env.prod` file. One option is to use an online generator such as [this one](https://www.browserling.com/tools/random-hex).
73+
3. Copy the redirect URI you just added and set it as `BACKEND_API_REDDIT_REDIRECT_URI` in your `.env` file.
74+
4. Copy the Reddit application's client ID (under "web app" label) and set it as `BACKEND_API_REDDIT_CLIENT_ID` in your `.env` file.
75+
5. Copy the Reddit application's secret and set it as `BACKEND_API_REDDIT_CLIENT_SECRET` in your `.env` file.
76+
6. Generate a random 64-digit hexadecimal string and set it as `BACKEND_API_ENCRYPTION_KEY_HEX` in your `.env` file. One option is to use an online generator such as [this one](https://www.browserling.com/tools/random-hex).
7677

7778
#### Updating
7879

79-
Images are automatically built and pushed to Docker Hub on every commit to the `main` branch, so there is technically no need to pull the latest files in. To update your local instance:
80+
Releases follow [semantic versioning](https://semver.org/) and are published on the [Releases page](../../releases). To update:
8081

81-
1. Make a backup of your MongoDB data just in case since data migrations may occur
82+
1. Back up your MongoDB data as a precaution (regular backups are a good idea regardless)
8283
2. Stop containers with `docker compose rm --stop -f`
83-
3. Pull latest images with `docker compose pull`
84-
4. Start containers with `docker compose up -d`
84+
3. Set your desired version in the `.env` file by updating `MONITORSS_VERSION` (e.g., `MONITORSS_VERSION=7` for version 7)
85+
4. Pull latest images with `docker compose pull`
86+
5. Start containers with `docker compose up -d`
87+
88+
##### Major Version Updates
89+
90+
Breaking changes to either the application and Docker compose files may happen between major versions. Check the [Releases page](../../releases) for instructons on upgrading major versions.
8591

8692
## Migrating from v6
8793

@@ -90,7 +96,7 @@ If you've been using MonitoRSS v6 (used by the repo https://github.com/synzen/Mo
9096
It's recommended that you don't delete your v6 files until you've confirmed that all your feeds are working as expected post-migration.
9197

9298
1. Follow the instructions above to self host. Be sure to clone this repo - the [clone repo](https://github.com/synzen/MonitoRSS-Clone) is no longer used or maintained.
93-
2. In your `.env.prod` file, set `BACKEND_API_MONGODB_URI` to your MongoDB URI
99+
2. In your `.env` file, set `BACKEND_API_MONGODB_URI` to your MongoDB URI
94100
3. Run `docker compose --parallel 1 up -d --build`
95101
- If you run into issues with network timeouts, pass the parallel flag to only build 1 container at once: `docker compose --parallel 1 up -d`
96102
4. Access the control panel via http://localhost:8000/servers and convert all your legacy feeds to personal feeds. Legacy feed articles will not be fetched/delivered until they are converted to personal feeds.

0 commit comments

Comments
 (0)