Skip to content

Conversation

@anshuman852
Copy link

This pull request introduces Docker support for the project, enabling easy deployment using Docker and Docker Compose, and improves the release automation workflow. It adds a production-ready Dockerfile, a sample docker-compose.yml, and a comprehensive GitHub Actions workflow for building, testing, and publishing multi-platform Docker images and releases. Additionally, it updates documentation and configuration to reflect these new capabilities.

Docker Support and Deployment

  • Added a production-ready multi-stage Dockerfile that builds the frontend and serves it using nginx:alpine, with runtime configuration via environment variables and included setup scripts.
  • Introduced a sample docker-compose.yml for local or production deployment, supporting environment-based configuration and health checks.
  • Updated .dockerignore to exclude unnecessary files from Docker build context, improving build efficiency and security.

Release Automation and CI/CD

  • Replaced the old release workflow with a new GitHub Actions workflow (docker.yml) that builds, tests, and publishes multi-platform Docker images, generates changelogs, and creates GitHub Releases with attached static build artifacts. [1] [2]

Documentation Updates

  • Expanded README.md to include Docker deployment instructions, environment variable configuration, and security features of the Docker image.
  • Updated configuration documentation to include new options for hiding URLs and the footer.

Changelog Generation Improvements

  • Enhanced changelog configuration to support more granular categories and conventional commit parsing for better release notes.

…play

- Add hideUrls boolean option to Config type
- Update Status component to conditionally hide URLs based on config
- Pass config through StatusGroup to Status components
- Add example config.json demonstrating hideUrls feature
- Update README.md with documentation for new hideUrls parameter
- Maintains backward compatibility (URLs shown by default)
- Create multi-stage Dockerfile with Node.js build and nginx serve stages
- Add runtime configuration generation via environment variables
- Include nginx setup script with SPA routing and API proxy support
- Add docker-compose.yml with comprehensive environment variable examples
- Create .dockerignore for optimized build context
- Update README.md with Docker deployment documentation and environment variables

Docker features:
- Uses secure 11notes/nginx base (rootless, distroless, 3.69MB)
- Runtime config generation from environment variables
- Security headers and optimizations
- Health checks and read-only filesystem
- Optional API proxying to Gatus backend
- Support for all config options including hideUrls via CONFIG_HIDE_URLS
…angelog generation; remove obsolete release workflow
Copy link
Owner

@BluemediaDev BluemediaDev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much for this PR. I commented on a couple of changes that I would like you to revise before I can merge this.

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use Node.js 22.x

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use Node.js 22.x

Comment on lines +203 to +285
- name: Generate commit-based changelog if no PRs found
id: commit_changelog
if: steps.changelog.outputs.changelog == '' || contains(steps.changelog.outputs.changelog, 'No pull requests found')
run: |
echo "changelog<<EOF" >> $GITHUB_OUTPUT
# Get commits between tags
commits=$(git log --pretty=format:"%s (%h)" ${{ github.event.before }}..${{ github.sha }})
# Categorize commits based on conventional commit prefixes
features=$(echo "$commits" | grep -E "^feat(\(.+\))?: " || true)
fixes=$(echo "$commits" | grep -E "^fix(\(.+\))?: " || true)
docs=$(echo "$commits" | grep -E "^docs(\(.+\))?: " || true)
style=$(echo "$commits" | grep -E "^style(\(.+\))?: " || true)
refactor=$(echo "$commits" | grep -E "^refactor(\(.+\))?: " || true)
perf=$(echo "$commits" | grep -E "^perf(\(.+\))?: " || true)
test=$(echo "$commits" | grep -E "^test(\(.+\))?: " || true)
build=$(echo "$commits" | grep -E "^(build|ci)(\(.+\))?: " || true)
chore=$(echo "$commits" | grep -E "^(chore|deps)(\(.+\))?: " || true)
other=$(echo "$commits" | grep -vE "^(feat|fix|docs|style|refactor|perf|test|build|ci|chore|deps)(\(.+\))?: " || true)
# Generate categorized changelog
if [ -n "$features" ]; then
echo "## 🚀 Features" >> $GITHUB_OUTPUT
echo "$features" | sed 's/^feat[^:]*: /- /' | sed 's/ (/ (/' >> $GITHUB_OUTPUT
echo "" >> $GITHUB_OUTPUT
fi
if [ -n "$fixes" ]; then
echo "## 🐛 Bug Fixes" >> $GITHUB_OUTPUT
echo "$fixes" | sed 's/^fix[^:]*: /- /' | sed 's/ (/ (/' >> $GITHUB_OUTPUT
echo "" >> $GITHUB_OUTPUT
fi
if [ -n "$docs" ]; then
echo "## 📚 Documentation" >> $GITHUB_OUTPUT
echo "$docs" | sed 's/^docs[^:]*: /- /' | sed 's/ (/ (/' >> $GITHUB_OUTPUT
echo "" >> $GITHUB_OUTPUT
fi
if [ -n "$style" ]; then
echo "## 🎨 Code Style" >> $GITHUB_OUTPUT
echo "$style" | sed 's/^style[^:]*: /- /' | sed 's/ (/ (/' >> $GITHUB_OUTPUT
echo "" >> $GITHUB_OUTPUT
fi
if [ -n "$refactor" ]; then
echo "## ♻️ Refactoring" >> $GITHUB_OUTPUT
echo "$refactor" | sed 's/^refactor[^:]*: /- /' | sed 's/ (/ (/' >> $GITHUB_OUTPUT
echo "" >> $GITHUB_OUTPUT
fi
if [ -n "$perf" ]; then
echo "## ⚡ Performance" >> $GITHUB_OUTPUT
echo "$perf" | sed 's/^perf[^:]*: /- /' | sed 's/ (/ (/' >> $GITHUB_OUTPUT
echo "" >> $GITHUB_OUTPUT
fi
if [ -n "$test" ]; then
echo "## ✅ Tests" >> $GITHUB_OUTPUT
echo "$test" | sed 's/^test[^:]*: /- /' | sed 's/ (/ (/' >> $GITHUB_OUTPUT
echo "" >> $GITHUB_OUTPUT
fi
if [ -n "$build" ]; then
echo "## 🔧 Build & CI" >> $GITHUB_OUTPUT
echo "$build" | sed 's/^(build|ci)[^:]*: /- /' | sed 's/ (/ (/' >> $GITHUB_OUTPUT
echo "" >> $GITHUB_OUTPUT
fi
if [ -n "$chore" ]; then
echo "## ⤵️ Dependencies" >> $GITHUB_OUTPUT
echo "$chore" | sed 's/^(chore|deps)[^:]*: /- /' | sed 's/ (/ (/' >> $GITHUB_OUTPUT
echo "" >> $GITHUB_OUTPUT
fi
if [ -n "$other" ]; then
echo "## 💭 Other Changes" >> $GITHUB_OUTPUT
echo "$other" | sed 's/^/- /' >> $GITHUB_OUTPUT
echo "" >> $GITHUB_OUTPUT
fi
echo "EOF" >> $GITHUB_OUTPUT
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't mikepenz/release-changelog-builder-action already handle this with the new configuration in HYBRID mode?

Comment on lines +294 to +334
## 🐳 Docker Images
Multi-platform Docker images are available at:
```bash
docker pull ${{ env.REGISTRY }}/${{ env.REGISTRY_IMAGE }}:${{ github.ref_name }}
docker pull ${{ env.REGISTRY }}/${{ env.REGISTRY_IMAGE }}:latest
```
## 🚀 Quick Start
### Docker Run
```bash
docker run -d -p 3000:80 \
-e CONFIG_TITLE="My Status Page" \
-e CONFIG_HIDE_URLS="true" \
-e CONFIG_HIDE_FOOTER="true" \
${{ env.REGISTRY }}/${{ env.REGISTRY_IMAGE }}:${{ github.ref_name }}
```
### Docker Compose
```yaml
version: '3.8'
services:
fancy-gatus:
image: ${{ env.REGISTRY }}/${{ env.REGISTRY_IMAGE }}:${{ github.ref_name }}
ports:
- "3000:80"
environment:
CONFIG_TITLE: "My Infrastructure Status"
CONFIG_GATUS_BASE_URL: "https://status.example.com"
CONFIG_HIDE_URLS: "false"
CONFIG_HIDE_FOOTER: "false"
```
## 📦 Static Build
Download the static build zip file from the assets below and serve with any web server.
## 🏗️ Supported Platforms
- linux/amd64
- linux/arm64
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to avoid including all this information with every release. In my opinion, this information should be included in the README instead.

@@ -0,0 +1,37 @@
# Build stage
FROM node:18-alpine AS builder
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also use Node.js 22 here.

Comment on lines +36 to +40
docker build -t fancy-gatus .
docker run -d -p 3000:80 \
-e CONFIG_TITLE="My Status Page" \
-e CONFIG_HIDE_URLS="true" \
fancy-gatus
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would rather use the latest image from the registry than build the container again.

Comment on lines +66 to +73
#### Security Features

The Docker image includes several security features:
- Lightweight nginx:alpine base image
- Read-only filesystem
- Automatic security scanning
- Minimal attack surface
- Efficient Alpine Linux base
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would leave that part out, as some of this is not true.


services:
fancy-gatus:
build: .
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, I would rather use the latest image from the registry.

NGINX_PORT: "80"

# Timezone
TZ: "UTC"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The time zone isn't used anywhere, is it?

server_tokens off;
# Access logs
access_log /var/log/nginx/access.log;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would write the access log to stdout or disable it completely.

@BluemediaDev BluemediaDev self-assigned this Aug 15, 2025
@BluemediaDev BluemediaDev added the enhancement New feature or request label Aug 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants