@@ -244,88 +244,6 @@ nix build .#rest-docker
244244docker 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
3312491. **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 \
3352535. **Regular updates** : Keep the Docker image updated
3362546. **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