You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: INSTALL.md
+65-4Lines changed: 65 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -75,12 +75,12 @@ Edit `.env` (see [Configuration](#configuration) below).
75
75
76
76
### Application Directories
77
77
78
-
Create the directories referenced in `.env` and assign ownership to the service user. Replace `$SERVICE_USER` with your username (or `relaysms` if you created that account):
78
+
Create the directories referenced in `.env` and assign ownership to the service user. Replace `$SERVICE_USER` with your username (or `relaysms` if you created that account). By default, the SQLite database, Celery broker/result/beat files all live under `data/` and the adapters live under `platforms/`:
If you changed any path variables in `.env`, create those directories instead.
93
+
If you changed any of the following path variables in `.env`, create the parent directory of each instead, and see [Install Services](#install-services) below for how to keep the systemd sandbox in sync:
The provided service unit files use a `__RW_PATHS__` placeholder for `ReadWritePaths=` instead of a hardcoded path, since all the paths listed above can be changed in `.env`. Substitute it with the actual, resolved directories before installing (`install.sh` does this for you automatically):
> All four services (`rest`, `grpc`, `worker`, `beat`) run with `ProtectSystem=strict` and `ProtectHome=true`, which make the entire filesystem read-only except for paths explicitly listed in `ReadWritePaths`. If you moved the SQLite database, Celery broker/result/beat files, or any adapter directory outside the installation root, add each resolved parent directory to `RW_PATHS` above - a path missing from `ReadWritePaths` will silently fail to write.
Use `platforms.sh` instead of calling `python3 -m platforms.cli` directly. It automatically resolves the install directory, loads `.env`, uses the project venv, and runs as the correct service user so adapter files and the registry never end up with mismatched ownership:
147
+
148
+
```bash
149
+
./platforms.sh add <GITHUB_URL># Add an adapter
150
+
./platforms.sh remove <NAME># Remove an adapter
151
+
./platforms.sh update [NAME] [--install] # Update one or all adapters
152
+
./platforms.sh list # List registered adapters
153
+
./platforms.sh recover # Rebuild registry from disk
154
+
./platforms.sh env # Show resolved paths and service user
155
+
./platforms.sh shell # Open a shell as the service user with .env loaded
156
+
```
157
+
158
+
See [Platforms Documentation](platforms/README.md) for details.
> If you move any of the `sqlite`-backed Celery paths outside the default `data/` directory, remember to add the new parent directory to `ReadWritePaths` when [installing services](#install-services), since the worker and beat units run under `ProtectSystem=strict`.
See [Platforms Documentation](platforms/README.md) and individual adapter READMEs for setup.
189
247
248
+
> [!NOTE]
249
+
> `PLATFORMS_REGISTRY_FILE` is written to by `platforms.cli add|remove|update` and read by the running services at startup. Always run `platforms.cli` as the service user (see [Platforms Documentation](platforms/README.md)) so the registry stays writable and readable across CLI runs and service restarts.
Copy file name to clipboardExpand all lines: README.md
+7-5Lines changed: 7 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -60,9 +60,8 @@ make build-setup
60
60
# Run database migrations
61
61
make migrate-up
62
62
63
-
# Start services
64
-
python3 grpc_server.py # Terminal 1
65
-
fastapi dev app.py # Terminal 2
63
+
# Start gRPC, REST API, Celery worker, and Celery beat together
64
+
./scripts/run.sh
66
65
```
67
66
68
67
### Docker
@@ -79,14 +78,17 @@ cp template.env .env
79
78
docker run -d \
80
79
--name relaysms-publisher \
81
80
--env-file .env \
82
-
-p 9000:9000 \
81
+
-p 16000:16000 \
83
82
-p 6000:6000 \
84
83
-v $(pwd)/data:/publisher/data \
84
+
-v $(pwd)/platforms:/publisher/platforms \
85
85
relaysms-publisher:latest
86
86
```
87
87
88
+
The container entrypoint runs pending database migrations, then starts the gRPC server, REST API, Celery worker, and Celery beat scheduler together (via `scripts/run.sh`).
89
+
88
90
> [!TIP]
89
-
> Update `GRPC_HOST=0.0.0.0`and `HOST=0.0.0.0` in `.env` for external container access.
91
+
> `HOST` and `GRPC_HOST` default to `0.0.0.0`inside the container so it's reachable from outside. If your `.env` file explicitly sets `HOST=127.0.0.1` or `GRPC_HOST=127.0.0.1` (e.g. copied unedited from `template.env`), it will override the container default and the services won't be reachable - remove or update those lines in `.env` for Docker deployments.
0 commit comments