A GitHub template repository for building custom LumeWeb Portal Docker images using the portal-builder base image.
This template provides a ready-to-use starting point for building your own custom LumeWeb Portal with custom plugins. It extends the ghcr.io/lumeweb/portal-builder:latest base image and includes:
- Example
Dockerfilewith multi-stage build configuration - Sample
portal-plugins.yamlwith plugin configuration - GitHub Actions workflow for automated building and pushing
- Complete documentation and examples
This template is optimized for Coolify's Dockerfile build pack:
- Click "Use this template" to create a new repository
- Clone your new repository
- Edit
portal-plugins.yamlto add your desired plugins - Push to your Git repository
- In Coolify:
- Create a new application
- Select "Dockerfile" as the build pack
- Configure your domain
- Deploy
Important: Do not declare ports in Dockerfile when using Coolify. Coolify handles port exposure automatically.
- Click "Use this template" on GitHub to create a new repository
- Clone your new repository
- Edit
portal-plugins.yamlto add your desired plugins - Build your custom portal image
# Clone this repository
git clone https://github.com/lumeweb/portal-docker-build-template.git my-portal
cd my-portal
# Edit portal-plugins.yaml to configure your plugins
vim portal-plugins.yaml
# Build your custom portal
docker build -t my-portal:latest .This template includes example files to help you get started:
portal-plugins.yaml- Main configuration file (edit this for your plugins)portal-plugins.example.yaml- Example with sample plugins for testing
Edit portal-plugins.yaml to configure your portal:
# Optional: Portal core version
portalVersion: latest
# List of plugins to include
plugins:
- module: go.lumeweb.com/portal-plugin-dashboard
version: latest
- module: go.lumeweb.com/portal-plugin-auth
version: v2.0.0You can also configure the build using Docker build arguments:
# Build with specific portal version
docker build --build-arg PORTAL_VERSION=develop -t my-portal:latest .
# Build with plugins from environment variable
docker build --build-arg PLUGINS="go.lumeweb.com/portal-plugin-dashboard@latest" -t my-portal:latest .See the LumeWeb Portal documentation for a list of available plugins.
docker build -t my-portal:latest .docker build --build-arg PORTAL_VERSION=develop -t my-portal:latest .docker buildx build \
--platform linux/amd64,linux/arm64 \
-t my-portal:latest \
--load \
.When deploying to Coolify, simply push your code and configure the application in the Coolify dashboard. Coolify will handle:
- Port exposure automatically
- Network configuration
- Proxy routing (if using Traefik)
When testing locally with Docker (not Coolify):
# Run the portal
docker run -p 8080:8080 my-portal:latest
# Run with custom configuration
docker run -p 8080:8080 \
-v $(pwd)/config:/home/portal/config \
my-portal:latestSee TESTING.md for comprehensive testing instructions including:
- Quick test guide
- Manual testing with build arguments
- Validation testing
- Multi-platform builds
- Debugging tips
- Common issues and solutions
This template includes a GitHub Actions workflow that automatically:
- Builds your custom portal image on push to
main/developbranches or tags - Pushes the image to GitHub Container Registry (GHCR)
- Supports multi-platform builds (linux/amd64, linux/arm64)
Coolify Note: When using GitHub Actions with Coolify, you can either:
- Let Coolify build from your Git repository directly (recommended)
- Use the GHCR image built by GitHub Actions and deploy it in Coolify using the "Docker Image" build pack
If deploying the GHCR image to Coolify, use the "Docker Image" build pack instead of "Dockerfile".
- Enable GitHub Actions in your repository settings
- Ensure your repository has the necessary permissions for packages
- Push to the
mainordevelopbranch or create a tag to trigger a build
You can manually trigger a build from the Actions tab in GitHub and specify a portal version.
The Dockerfile is structured as a multi-stage build:
- Builder stage: Uses
portal-builderto compile your custom portal - Runtime stage: Uses a minimal Alpine image to run the portal
You can customize:
- Runtime dependencies in the Alpine stage (includes libwebp for WebP support)
- Port exposure (EXPOSE is commented out per Coolify recommendations)
- User configuration
- Working directory
- Environment variables
The .github/workflows/build-docker.yml workflow can be customized:
- Add more build platforms
- Change registry destination
- Add additional build steps
- Configure caching strategies
# Test with the example configuration
docker build -f Dockerfile -t my-portal-test .# portal-plugins.yaml
portalVersion: latest
plugins: []plugins:
- module: go.lumeweb.com/portal-plugin-dashboard
version: v2.1.0
- module: go.lumeweb.com/portal-plugin-auth
version: v2.0.5# In Dockerfile
FROM ghcr.io/lumeweb/portal-builder:latest AS builder
ARG PLUGINS
ENV PLUGINS=${PLUGINS}
RUN build-portal
FROM alpine:latest
COPY --from=builder /dist/portal /usr/local/bin/portal
CMD ["portal"]Build:
docker build --build-arg PLUGINS="go.lumeweb.com/portal-plugin-dashboard@latest" -t my-portal ."Port is already allocated" error:
- Ensure
EXPOSEis commented out in your Dockerfile - Coolify manages port binding automatically
Application not accessible after deployment:
- Verify your domain is correctly configured in Coolify
- Check that the application is running in the Coolify dashboard
- Review application logs in Coolify
Build fails in Coolify:
- Check the build logs in Coolify for specific error messages
- Verify your portal-plugins.yaml follows the correct format
- Ensure all plugin versions are valid
Ensure the plugin module path is correct and the version exists. Check the plugin's repository for available versions.
The portal-plugins.yaml must conform to the JSON schema. Check that:
moduleis a valid Go module pathversionis a valid semantic version orlatest
The portal-builder image includes a pre-populated Go module cache, but custom plugins may still need to be downloaded. Consider using Docker layer caching:
docker build --cache-from my-portal:latest -t my-portal:latest .This template is licensed under the same license as the LumeWeb Portal project.