readme: add build & deploy section (server docker, android APK, gitea release)
This commit is contained in:
56
README.md
56
README.md
@@ -156,6 +156,62 @@ synq/
|
|||||||
5. add history screen and resend handling.
|
5. add history screen and resend handling.
|
||||||
6. polish launch speed and widget/share-target only after core path works.
|
6. polish launch speed and widget/share-target only after core path works.
|
||||||
|
|
||||||
|
## build & deploy
|
||||||
|
|
||||||
|
### server (docker)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# build
|
||||||
|
docker build -t synq-server ./server
|
||||||
|
|
||||||
|
# run (replace paths and token as needed)
|
||||||
|
docker run -d --name synq --restart=unless-stopped \
|
||||||
|
-p 8765:8765 \
|
||||||
|
-v /mnt/user/synq/data:/data \
|
||||||
|
synq-server
|
||||||
|
```
|
||||||
|
|
||||||
|
the server generates a random token on first start and logs it prominently. copy it into the android app settings. to use a fixed token instead, pass `-e PHONE_CAPTURE_TOKEN=yourtoken`.
|
||||||
|
|
||||||
|
to rebuild after a `git pull`:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git pull
|
||||||
|
docker build -t synq-server ./server
|
||||||
|
docker stop synq && docker rm synq
|
||||||
|
# re-run the docker run command above
|
||||||
|
```
|
||||||
|
|
||||||
|
### android
|
||||||
|
|
||||||
|
open `android/` in Android Studio and hit **Sync**. then either:
|
||||||
|
|
||||||
|
- **run on device/emulator directly** from Android Studio (▶), or
|
||||||
|
- **build a release APK** from the terminal:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd android
|
||||||
|
./gradlew assembleRelease
|
||||||
|
# output: app/build/outputs/apk/release/app-release-unsigned.apk
|
||||||
|
```
|
||||||
|
|
||||||
|
sideload to a connected device:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
adb install app/build/outputs/apk/release/app-release-unsigned.apk
|
||||||
|
```
|
||||||
|
|
||||||
|
### releasing on gitea
|
||||||
|
|
||||||
|
tag the commit and push the tag:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git tag v1.0.0
|
||||||
|
git push gitea v1.0.0
|
||||||
|
```
|
||||||
|
|
||||||
|
then go to **Releases → New Release** in the Gitea UI, pick the tag, and drag the APK into the assets box. anyone on the LAN can download it from there.
|
||||||
|
|
||||||
## backup
|
## backup
|
||||||
|
|
||||||
### what to back up
|
### what to back up
|
||||||
|
|||||||
Reference in New Issue
Block a user