mirror of
https://github.com/alexhopeoconnor/bom-local-service.git
synced 2026-10-04 03:28:11 +10:00
Add Xvfb monitoring and restart functionality
- Move startup script to scripts/docker-start.sh for better organization - Add automatic monitoring and restart of Xvfb if it crashes - Improve error handling and cleanup on container shutdown - Prevents cache update failures when Xvfb process dies
This commit is contained in:
+3
-6
@@ -34,12 +34,9 @@ COPY --from=publish /app/publish .
|
||||
# Create cache directory for screenshots
|
||||
RUN mkdir -p /app/cache && chmod 777 /app/cache
|
||||
|
||||
# Create startup script to run Xvfb and then the app
|
||||
RUN echo '#!/bin/bash\n\
|
||||
Xvfb :99 -screen 0 1920x1080x24 > /dev/null 2>&1 &\n\
|
||||
export DISPLAY=:99\n\
|
||||
exec dotnet BomLocalService.dll' > /app/start.sh && \
|
||||
chmod +x /app/start.sh
|
||||
# Copy startup script
|
||||
COPY scripts/docker-start.sh /app/start.sh
|
||||
RUN chmod +x /app/start.sh
|
||||
|
||||
# OCI labels for GitHub Container Registry metadata
|
||||
LABEL org.opencontainers.image.source="https://github.com/alexhopeoconnor/bom-local-service"
|
||||
|
||||
Reference in New Issue
Block a user