Skip to content

Conversation

@asim
Copy link
Member

@asim asim commented Jan 27, 2026

Summary

Adds deployment documentation and fixes web service for deployment.

Changes

1. Embed static files (web/main.go)

Use Go's embed package to include static files in the binary:

  • Templates (layout.html, index.html, etc.)
  • CSS and JS files

This allows the web service to run from any directory without needing the static files on the filesystem.

2. Deployment documentation (DEPLOY.md)

Step-by-step guide for deploying the blog:

  • Server setup with micro init --server
  • Environment configuration
  • Deployment with micro deploy
  • Service management

3. Example deploy targets (micro.mu)

Added commented example deploy targets for prod/staging.

Testing

Deployed to a test server using:

micro deploy localhost

All services now run correctly:

  • users ✓
  • posts ✓
  • comments ✓
  • web ✓ (with embedded templates)

Related

  • go-micro PR #2836: Add systemd-based deployment support

- DEPLOY.md: Step-by-step deployment guide
- micro.mu: Example deploy targets (commented out)

Co-authored-by: Shelley <[email protected]>
Use Go's embed package to include static files in the binary.
This allows the web service to run from any directory without
needing the static files to be present on the filesystem.

Required for: micro deploy

Co-authored-by: Shelley <[email protected]>
@asim asim merged commit 275d31d into master Jan 27, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants