Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Aug 20, 2025

This PR enhances the existing Weblate docker-compose project to fully comply with Websoft9 standards and implement all requirements from the development checklist.

Key Enhancements

Architecture & Standardization

  • 3-container setup: Weblate main application, PostgreSQL 17-alpine database, Redis 8-alpine cache
  • Health checks: Implemented for all services with proper intervals, timeouts, and retry logic
  • Service dependencies: Added proper depends_on with health check conditions for reliable startup ordering
  • Logging configuration: Added JSON file driver with rotation limits (5 files, 10MB max)
  • Network compliance: Uses external websoft9 network following repository standards

Environment Variables & Configuration

  • Comprehensive .env file: Added 25+ environment variables covering all Weblate features
  • Database connection: Complete PostgreSQL connection string configuration
  • Cache configuration: Redis connection settings for optimal performance
  • Security settings: Secret key, allowed hosts, and authentication configuration
  • Internationalization: Timezone (UTC) and i18n settings for global usage
  • SMTP template: Ready-to-use email configuration for notifications

Proxy & Networking

  • nginx_proxy.conf: Added reverse proxy configuration with WebSocket support for real-time translation features
  • Port configuration: Internal port 8080 mapped to configurable external port (default 9001)
  • Connection URIs: Proper database and cache connection strings

Documentation & Setup

  • Enhanced Notes.md: Comprehensive setup guide with configuration examples
  • CHANGELOG.md: Documented all enhancements and improvements
  • Fixed variables.json: Corrected Docker Hub URL for version tracking

Configuration Example

The setup provides a complete translation management platform with:

services:
  weblate:
    image: weblate/weblate:5
    depends_on:
      cache:
        condition: service_healthy
      database:
        condition: service_healthy
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:8080/healthz/"]

Environment variables include database connection (postgresql://weblate:password@weblate-db/weblate), cache settings, admin credentials, and optional SMTP configuration for email notifications.

Testing & Validation

  • Docker compose configuration syntax validated successfully
  • Environment variable expansion verified
  • Health check patterns consistent with other repository applications
  • Network and volume configurations confirmed working

Fixes #1558.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copy link
Contributor Author

Copilot AI commented Aug 20, 2025

@chendelin1982 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs.

I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review.

@Copilot Copilot AI changed the title [WIP] Create docker-compose.yml project for [weblate] Create comprehensive docker-compose.yml project for Weblate with standardized syntax Aug 20, 2025
@Copilot Copilot AI requested a review from chendelin1982 August 20, 2025 06:53
Copilot finished work on behalf of chendelin1982 August 20, 2025 06:53
@qiaofeng1227 qiaofeng1227 marked this pull request as ready for review August 25, 2025 01:13
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.

Create docker-compose.yml project for [weblate]
2 participants