Skip to content

Commit 3f26e88

Browse files
committed
docs: reduce code
1 parent 97fcc21 commit 3f26e88

3 files changed

Lines changed: 11 additions & 131 deletions

File tree

.github/workflows/docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,15 @@ jobs:
3737
run: sed -i 's|site-url = ".*"|site-url = "/lib/"|' docs/book.toml
3838

3939
- name: Build docs
40-
run: mdbook build docs -d book
40+
run: mdbook build docs
4141

4242
- name: Setup Pages
4343
uses: actions/configure-pages@v4
4444

4545
- name: Upload artifact
4646
uses: actions/upload-pages-artifact@v3
4747
with:
48-
path: 'book'
48+
path: 'docs/book'
4949

5050
- name: Deploy to GitHub Pages
5151
id: deployment

docs/book.toml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ edit-url-template = "https://github.com/PortalTechnologiesInc/lib/edit/master/do
1010
site-url = "/docs/"
1111
additional-js = ["./tabs.js"]
1212

13-
[output.html.search]
14-
enable = true
15-
limit-results = 30
16-
teaser-word-count = 30
17-
use-boolean-and = true
18-
boost-title = 2
19-
boost-hierarchy = 1
20-
boost-paragraph = 1
21-
expand = true
13+
# [output.html.search]
14+
# enable = true
15+
# limit-results = 30
16+
# teaser-word-count = 30
17+
# use-boolean-and = true
18+
# boost-title = 2
19+
# boost-hierarchy = 1
20+
# boost-paragraph = 1
21+
# expand = true

docs/getting-started/docker-deployment.md

Lines changed: 0 additions & 120 deletions
Original file line numberDiff line numberDiff line change
@@ -244,88 +244,6 @@ nix build .#rest-docker
244244
docker load < result
245245
```
246246

247-
### Multi-Architecture Builds
248-
249-
To build for multiple architectures:
250-
251-
```bash
252-
# On amd64 machine
253-
nix build .#rest-docker
254-
docker tag portal-rest:latest getportal/sdk-daemon:amd64
255-
docker push getportal/sdk-daemon:amd64
256-
257-
# On arm64 machine
258-
nix build .#rest-docker
259-
docker tag portal-rest:latest getportal/sdk-daemon:arm64
260-
docker push getportal/sdk-daemon:arm64
261-
262-
# Create and push manifest
263-
docker manifest create getportal/sdk-daemon:latest \
264-
--amend getportal/sdk-daemon:amd64 \
265-
--amend getportal/sdk-daemon:arm64
266-
docker manifest push getportal/sdk-daemon:latest
267-
```
268-
269-
## Container Management
270-
271-
### Viewing Logs
272-
273-
```bash
274-
# Follow logs in real-time
275-
docker logs -f portal-sdk-daemon
276-
277-
# View last 100 lines
278-
docker logs --tail 100 portal-sdk-daemon
279-
280-
# View logs with timestamps
281-
docker logs -t portal-sdk-daemon
282-
```
283-
284-
### Monitoring Health
285-
286-
```bash
287-
# Check container status
288-
docker ps -f name=portal-sdk-daemon
289-
290-
# Check health status
291-
docker inspect --format='{{.State.Health.Status}}' portal-sdk-daemon
292-
293-
# Test health endpoint directly
294-
curl http://localhost:3000/health
295-
```
296-
297-
### Restarting the Service
298-
299-
```bash
300-
# Restart container
301-
docker restart portal-sdk-daemon
302-
303-
# Stop container
304-
docker stop portal-sdk-daemon
305-
306-
# Remove container
307-
docker rm portal-sdk-daemon
308-
```
309-
310-
### Updating to Latest Version
311-
312-
```bash
313-
# Pull latest image
314-
docker pull getportal/sdk-daemon:latest
315-
316-
# Stop and remove old container
317-
docker stop portal-sdk-daemon
318-
docker rm portal-sdk-daemon
319-
320-
# Start new container
321-
docker run -d \
322-
--name portal-sdk-daemon \
323-
-p 3000:3000 \
324-
-e PORTAL__AUTH__AUTH_TOKEN=your-token \
325-
-e PORTAL__NOSTR__PRIVATE_KEY=your-key \
326-
getportal/sdk-daemon:latest
327-
```
328-
329247
## Security Considerations
330248

331249
1. **Never commit secrets**: Don't include `PORTAL__AUTH__AUTH_TOKEN` or `PORTAL__NOSTR__PRIVATE_KEY` in version control
@@ -335,44 +253,6 @@ docker run -d \
335253
5. **Regular updates**: Keep the Docker image updated
336254
6. **Monitor logs**: Watch for suspicious activity
337255

338-
## Troubleshooting
339-
340-
### Container won't start
341-
342-
```bash
343-
# Check logs for errors
344-
docker logs portal-sdk-daemon
345-
346-
# Verify environment variables
347-
docker inspect portal-sdk-daemon | grep -A 20 Env
348-
```
349-
350-
### Health check failing
351-
352-
```bash
353-
# Test health endpoint
354-
curl http://localhost:3000/health
355-
356-
# Check if port is accessible
357-
netstat -tlnp | grep 3000
358-
359-
# Verify container is running
360-
docker ps -a
361-
```
362-
363-
### Permission issues
364-
365-
```bash
366-
# Run with specific user
367-
docker run -d \
368-
--user 1000:1000 \
369-
--name portal \
370-
-p 3000:3000 \
371-
-e PORTAL__AUTH__AUTH_TOKEN=token \
372-
-e PORTAL__NOSTR__PRIVATE_KEY=key \
373-
getportal/sdk-daemon:latest
374-
```
375-
376256
---
377257

378258
**Next Steps**:

0 commit comments

Comments
 (0)