chore: update docs (#2094)

This commit is contained in:
boojack 2023-08-06 11:25:35 +08:00 committed by GitHub
parent 843850675f
commit 4d3e4358e8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 17 additions and 185 deletions

View file

@ -1,18 +0,0 @@
# Adding A Custom Theme
1. Open the Settings Dialog
2. Navigate to the System Tab
3. In the "Additional Styles" box add these lines of code:
```css
.memo-list-container {
background-color: #INSERT COLOR HERE;
}
.page-container {
background-color: #INSERT COLOR HERE;
}
```
It is recommended that you choose the same color for both options
4. Refresh the page and the background color of your memos app will successfully update to reflect your changes

View file

@ -1,133 +0,0 @@
# A Beginner's Guide to Deploying Memos on Render.com
written by [AJ](https://memos.ajstephens.website/) (also a noob)
<img height="64px" src="https://usememos.com/logo-full.png" alt="✍️ memos" />
[Live Demo](https://demo.usememos.com) • [Official Website](https://usememos.com) • [Source Code](https://github.com/usememos/memos)
## Who is this guide for?
Someone who...
- doesn't have much experience with self hosting
- has a minimal understanding of docker
Someone who wants...
- to use memos
- to support the memos project
- a cost effective and simple way to host it on the cloud with reliability and persistance
- to share memos with friends
## Requirements
- Can follow instructions
- Have 7ish USD a month on a debit/credit card
## Guide
Create an account at [Render](https://dashboard.render.com/register)
![ss1](https://i.imgur.com/l3K7aqC.png)
1. Go to your dashboard
[https://dashboard.render.com/](https://dashboard.render.com/)
2. Select New Web Service
![ss2](https://i.imgur.com/IIDdK2y.png)
3. Scroll down to "Public Git repository"
4. Paste in the link for the public git repository for memos (https://github.com/usememos/memos) and press continue
![ss3](https://i.imgur.com/OXoCWoJ.png)
5. Render will pre-fill most of the fields but you will need to create a unique name for your web service
6. Adjust region if you want to
7. Don't touch the "branch", "root directory", and "environment" fields
![ss4](https://i.imgur.com/v7Sw3fp.png)
8. Click "enter your payment information" and do so
![ss5](https://i.imgur.com/paKcQFl.png)
![ss6](https://i.imgur.com/JdcO1HC.png)
9. Select the starter plan ($7 a month - a requirement for persistant data - render's free instances spin down when inactive and lose all data)
10. Click "Create Web Service"
![ss7](https://i.imgur.com/MHe45J4.png)
11. Wait patiently while the _magic_ happens 🤷‍♂️
![ss8](https://i.imgur.com/h1PXHHJ.png)
12. After some time (~ 6 min for me) the build will finish and you will see the web service is live
![ss9](https://i.imgur.com/msapkRw.png)
13. Now it's time to add the disk so your data won't dissappear when the webservice redeploys (redeploys happen automatically when the public repo is updated)
14. Select the "Disks" tab on the left menu and then click "Add Disk"
![ss10](https://i.imgur.com/rGeI0bv.png)
15. Name your disk (can be whatever)
16. Set the "Mount Path" to `/var/opt/memos`
17. Set the disk size (default is 10GB but 1GB is plenty and can be increased at any time)
18. Click "Save"
![ss11](https://i.imgur.com/Jbg7O6q.png)
19. Wait...again...while the webservice redeploys with the persistant disk
![ss12](https://i.imgur.com/pTzpE34.png)
20. aaaand....we're back online!
![ss13](https://i.imgur.com/qdsFfSa.png)
21. Time to test! We're going to make sure everything is working correctly.
22. Click the link in the top left, it should look like `https://the-name-you-chose.onrender.com` - this is your self hosted memos link!
![ss14](https://i.imgur.com/cgzFSIn.png)
23. Create a Username and Password (remember these) then click "Sign up as Host"
![ss15](https://i.imgur.com/kuRStAj.png)
24. Create a test memo then click save
![ss16](https://i.imgur.com/Eh2AB44.png)
25. Sign out of your self-hosted memos
![ss17](https://i.imgur.com/0mMb88G.png)
26. Return to your Render dashboard, click the "Manual Deploy" dropdown button and click "Deploy latest commit" and wait until the webservice is live again (This is to test that your data is persistant)
![ss18](https://i.imgur.com/w1N7VTb.png)
27. Once the webservice is live go back to your self-hosted memos page and sign in! (If your memos screen looks different then something went wrong)
28. Once you're logged in, verify your test memo is still there after the redeploy
![ss19](https://i.imgur.com/dTcEQZS.png)
![ss20](https://i.imgur.com/VE2lu8H.png)
## 🎉Celebrate!🎉
You did it! Enjoy using memos!
Want to learn more or need more guidance? Join the community on [telegram](https://t.me/+-_tNF1k70UU4ZTc9) and [discord](https://discord.gg/tfPJa4UmAv).

View file

@ -1,4 +1,4 @@
# Development # Development in Windows
Memos is built with a curated tech stack. It is optimized for developer experience and is very easy to start working on the code: Memos is built with a curated tech stack. It is optimized for developer experience and is very easy to start working on the code:
@ -8,7 +8,7 @@ Memos is built with a curated tech stack. It is optimized for developer experien
## Tech Stack ## Tech Stack
| Frontend | Backend | | Frontend | Backend |
| ---------------------------------------- | --------------------------------- | | ---------------------------------------- | --------------------------------- |
| [React](https://react.dev/) | [Go](https://go.dev/) | | [React](https://react.dev/) | [Go](https://go.dev/) |
| [Tailwind CSS](https://tailwindcss.com/) | [SQLite](https://www.sqlite.org/) | | [Tailwind CSS](https://tailwindcss.com/) | [SQLite](https://www.sqlite.org/) |
@ -75,16 +75,16 @@ go build -o ./build/memos.exe ./main.go
## ❕ Notes ## ❕ Notes
- Start development servers easier by running the provided `start.ps1` script. - Start development servers easier by running the provided `start.ps1` script.
This will start both backend and frontend in detached PowerShell windows: This will start both backend and frontend in detached PowerShell windows:
```powershell ```powershell
.\scripts\start.ps1 .\scripts\start.ps1
``` ```
- Produce a local build easier using the provided `build.ps1` script to build both frontend and backend: - Produce a local build easier using the provided `build.ps1` script to build both frontend and backend:
```powershell ```powershell
.\scripts\build.ps1 .\scripts\build.ps1
``` ```
This will produce a memos.exe file in the ./build directory. This will produce a memos.exe file in the ./build directory.

View file

@ -1,6 +0,0 @@
# Setup
After deploying and running Memos in `prod` mode, you should create "host" user. There are two ways to do this:
1. Navigate to the Memos application URL, such as `http://localhost:5230`, and follow the prompts to create a username and password for the "host" user.
2. Use the command `memos setup --host-username=$USERNAME --host-password=$PASSWORD --mode=prod` to set up the host user. This method may be more convenient for deploying through Ansible or other provisioning softwares.

View file

@ -1,11 +0,0 @@
# Updating memos after deploying
## fly.io
### update to latest
Under the directory where you had your `fly.toml` file
```
flyctl deploy
```

View file

@ -24,7 +24,7 @@ nssm install memos "C:\path\to\memos.exe" --mode prod --port 5230
nssm set memos DisplayName "memos service" nssm set memos DisplayName "memos service"
# Configure extra service parameters # Configure extra service parameters
nssm set memos Description "A lightweight, self-hosted memo hub. https://usememos.com/" nssm set memos Description "A lightweight, self-hosted memo hub. https://usememos.com/"
# Delay auto start # Delay auto start
nssm set memos Start SERVICE_DELAYED_AUTO_START nssm set memos Start SERVICE_DELAYED_AUTO_START
@ -54,7 +54,7 @@ Now, in the same directory, create the service configuration file `memos-service
<executable>%BASE%\memos.exe</executable> <executable>%BASE%\memos.exe</executable>
<arguments>--mode prod --port 5230</arguments> <arguments>--mode prod --port 5230</arguments>
<delayedAutoStart>true</delayedAutoStart> <delayedAutoStart>true</delayedAutoStart>
<log mode="none" /> <log mode="none" />
</service> </service>
``` ```
@ -86,12 +86,12 @@ Also, by using one of the provided methods, the service will appear in the Windo
- On Windows, memos store its data in the following directory: - On Windows, memos store its data in the following directory:
```powershell ```powershell
$env:ProgramData\memos $env:ProgramData\memos
# Typically, this will resolve to C:\ProgramData\memos # Typically, this will resolve to C:\ProgramData\memos
``` ```
You may specify a custom directory by appending `--data <path>` to the service command line. You may specify a custom directory by appending `--data <path>` to the service command line.
- If the service fails to start, you should inspect the Windows Event Viewer `eventvwr.msc`. - If the service fails to start, you should inspect the Windows Event Viewer `eventvwr.msc`.