{"id":29631087,"url":"https://github.com/leadcms/leadcms.deploy","last_synced_at":"2026-02-05T22:31:38.554Z","repository":{"id":218520753,"uuid":"745466760","full_name":"LeadCMS/leadcms.deploy","owner":"LeadCMS","description":"Spin up LeadCMS.ai in seconds — your Docker Compose blueprint for effortless AI-powered CMS \u0026 CRM deployment.","archived":false,"fork":false,"pushed_at":"2025-09-11T10:15:53.000Z","size":14,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-11T12:44:30.863Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://leadcms.ai","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LeadCMS.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-01-19T11:54:01.000Z","updated_at":"2025-09-11T10:15:57.000Z","dependencies_parsed_at":"2024-08-02T06:53:27.546Z","dependency_job_id":null,"html_url":"https://github.com/LeadCMS/leadcms.deploy","commit_stats":null,"previous_names":["peterliapin/onlinesales.deploy","leadcms/leadcms.deploy"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/LeadCMS/leadcms.deploy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LeadCMS%2Fleadcms.deploy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LeadCMS%2Fleadcms.deploy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LeadCMS%2Fleadcms.deploy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LeadCMS%2Fleadcms.deploy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LeadCMS","download_url":"https://codeload.github.com/LeadCMS/leadcms.deploy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LeadCMS%2Fleadcms.deploy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29136762,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-05T21:59:57.939Z","status":"ssl_error","status_checked_at":"2026-02-05T21:59:57.628Z","response_time":65,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-07-21T11:08:09.462Z","updated_at":"2026-02-05T22:31:38.539Z","avatar_url":"https://github.com/LeadCMS.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LeadCMS Deployment Guide (Sample Docker Compose)\n\nThis document provides a sample deployment approach for LeadCMS using Docker Compose. It is intended as a reference for DevOps teams to understand how the CMS and its dependencies can be orchestrated for local development, evaluation, or as a starting point for production deployments.\n\n---\n\n## Important Notes for DevOps Teams\n\n- **The provided `docker-compose.yml` is a sample.**  \n  It demonstrates how to run LeadCMS and its dependencies (PostgreSQL, Elasticsearch, Kibana) together for convenience.\n- **You are not required to use this exact setup.**  \n  In production, you may (and often should) host PostgreSQL, Elasticsearch, and other services separately, using managed services or your own infrastructure.\n- **Backups, reliability, and scalability are not addressed in this sample.**  \n  The sample does not include production-grade features such as automated backups, high availability, monitoring, or scaling. These must be implemented by your DevOps team according to your organization's requirements.\n- **Sensitive data:**  \n  The `.env` file contains secrets and credentials. Never commit it to version control.\n\n---\n\n## Prerequisites\n\n- [Docker](https://www.docker.com/products/docker-desktop) installed and running\n- [Docker Compose](https://docs.docker.com/compose/) (if not included with Docker Desktop)\n- (Optional) [PowerShell](https://docs.microsoft.com/en-us/powershell/) for Windows users\n\n---\n\n\n## 1. Clone the Repository\n\n```bash\ngit clone https://github.com/LeadCMS/leadcms.deploy.git\ncd leadcms.deploy\n```\n\n---\n\n\n## 2. Generate Environment Variables\n\nLeadCMS uses a `.env` file for configuration. You **must** generate this file before starting the containers.\n\n### On Linux/macOS\n\nRun the provided shell script:\n\n```bash\nchmod +x generate-env.sh\n./generate-env.sh\n```\n\n### On Windows\n\nRun the PowerShell script:\n\n```powershell\n.\\generate-env.ps1\n```\n\n- The script will:\n  - Read `.env.sample`\n  - Generate secure random secrets and passwords\n  - Write a new `.env` file\n\n**Note:** If a `.env` file already exists, you will be prompted before overwriting.\n\n---\n\n## 3. Review and Customize `.env`\n\n- Open `.env` in your editor.\n- **It is important to set all email-related variables:**\n  - `EMAIL__USERNAME` (your SMTP username)\n  - `EMAIL__PASSWORD` (your SMTP password)\n  - `EMAIL__SERVER` (SMTP server address)\n  - `EMAIL__PORT` (SMTP server port)\n  - `EMAIL__USESSL` (set to `true` if your SMTP requires SSL)\n- Also review and update:\n  - `CORS__ALLOWEDORIGINS__*` (allowed origins for your frontend)\n  - Any other settings specific to your environment\n\n### Supported Languages\n\nTo configure a list of supported languages, add the following to your `.env` file:\n\n```\nSUPPORTEDLANGUAGES__0=en\nSUPPORTEDLANGUAGES__1=de\n```\n\nYou can add more languages by incrementing the index.\n\n---\n\n\n## 4. Start the Sample Stack\n\nFrom the repository root, run:\n\n```bash\ndocker-compose up -d\n```\n\n- This will start:\n  - PostgreSQL (sample, local container)\n  - LeadCMS core application\n\n---\n\n## 5. Access the Services\n\n- **LeadCMS API:** [http://localhost:8080](http://localhost:8080)\n\n---\n\n## 6. Default Admin User\n\n- Username: as set in `.env` (`DEFAULTUSERS__0__USERNAME`)\n- Password: as generated in `.env` (`DEFAULTUSERS__0__PASSWORD`)\n- Email: as set in `.env` (`DEFAULTUSERS__0__EMAIL`)\n\n---\n\n\n## 7. Stopping and Cleaning Up\n\nTo stop the stack:\n\n```bash\ndocker compose down\n```\n\nTo remove all data (Postgres/Elastic):\n\n```bash\ndocker compose down -v\n```\n\n---\n\n## Troubleshooting\n\n### PostgreSQL Authentication Issues\n\n\nIf you encounter authentication errors when connecting to PostgreSQL, it may be due to an existing Docker volume containing an old database with a different password. In this case:\n\n1. Stop all running containers:\n  ```bash\n  docker compose down\n  ```\n2. Remove all persistent data volumes (this will delete all data in Postgres and Elastic):\n  ```bash\n  docker compose down -v\n  ```\n3. Start the stack again:\n  ```bash\n  docker compose up -d\n  ```\nThis will re-create the databases with the current credentials from your `.env` file.\n\n---\n\n## Plugin Mounting\n\nTo extend LeadCMS with plugins, you can mount external plugin directories into the container using Docker volumes. This allows you to:\n\n- Attach custom plugins by mounting their directories into the `/app/plugins/YourPluginName` path inside the container.\n\n**Plugin configuration:**  \nEach plugin must also be defined in the plugin list in your `.env` file using indexed keys, for example:\n```\nPLUGINS__0=LeadCMS.Plugin.Site\n```\nOnly plugins listed here will be loaded by the core application.\n\n**How it works (theory):**\n\n- In your Docker Compose file, define a named volume for each plugin you want to attach.\n- Use the `volumes` section of your service to map the host directory (where your plugin code resides) to the appropriate path inside the container.\n\n**For example:**\n- To attach a plugin named `LeadCMS.Plugin.Site`, mount your host's plugin directory to `/app/plugins/LeadCMS.Plugin.Site`.\n\n**Note:**  \nAdjust the host paths to match your environment and ensure the plugin directory structure matches what LeadCMS expects.\n\nThis approach allows you to keep plugins outside of the container image, making updates and development easier.\n\n---\n\n## Deployment Considerations\n\n- **Production deployments should not rely on the sample Docker Compose file.**\n    - Use managed or production-grade PostgreSQL and Elasticsearch services.\n    - Configure secure networking, firewalls, and access controls.\n    - Implement automated backups and disaster recovery for all data stores.\n    - Plan for monitoring, alerting, and log aggregation.\n    - Consider scaling requirements and high availability.\n    - Review and harden all secrets and credentials.\n    - Use persistent storage for all stateful services.\n\n- **The sample Docker Compose is best used for:**\n    - Local development and testing\n    - Evaluation and proof-of-concept deployments\n    - As a reference for your own infrastructure-as-code\n\n---\n\n\n## Database Backup and Restore Scripts\n\nThis repository includes utility scripts for backing up and restoring your PostgreSQL database, available in both shell script and PowerShell versions:\n\n### PostgreSQL Backup\n\nCreate a backup of your PostgreSQL database. Optionally, you can exclude user-related tables from the backup.\n\n#### On Linux/macOS\n\n```bash\n./pg-backup.sh \u003cdatabase_name\u003e [--exclude-user-tables]\n```\n\nExamples:\n- Full backup: `./pg-backup.sh leadcms`\n- Excluding user tables: `./pg-backup.sh leadcms --exclude-user-tables`\n\n#### On Windows\n\n```powershell\n.\\pg-backup.ps1 \u003cdatabase_name\u003e [-ExcludeUserTables]\n```\n\nExamples:\n- Full backup: `.\\pg-backup.ps1 leadcms`\n- Excluding user tables: `.\\pg-backup.ps1 leadcms -ExcludeUserTables`\n\n### PostgreSQL Restore\n\nRestore a PostgreSQL database from a backup file. If the database does not exist, it will be created automatically.\n\n#### On Linux/macOS\n\n```bash\n./pg-restore.sh \u003cdatabase_name\u003e \u003cbackup_file\u003e\n```\n\n#### On Windows\n\n```powershell\n.\\pg-restore.ps1 \u003cdatabase_name\u003e \u003cbackup_file\u003e\n```\n\n### PostgreSQL Media Table Restore\n\nRestore only the `media` table from a backup file into the specified database.\n\n#### On Linux/macOS\n\n```bash\n./pg-restore-media.sh \u003cdatabase_name\u003e \u003cbackup_file\u003e\n```\n\n#### On Windows\n\n```powershell\n.\\pg-restore-media.ps1 \u003cdatabase_name\u003e \u003cbackup_file\u003e\n```\n\n**Note:** All scripts use environment variables from your `.env` file for database credentials. Make sure your `.env` is up to date before running these scripts.\n\n---\n\n## Limitations of the Sample Setup\n\n- **No backup or restore automation** for databases (only manual scripts are provided).\n- **No high availability or failover** for any service.\n- **No monitoring, alerting, or log aggregation** included.\n- **No scaling or load balancing** configuration.\n- **No SSL/TLS** for internal or external endpoints.\n- **No production-grade security hardening**.\n\n**Your DevOps team is responsible for addressing these areas in your deployment.**\n\n---\n\n## HTTPS, Static Sites, and Preview Hosting\n\nFor setting up SSL/TLS (HTTPS) using Let's Encrypt, as well as hosting static sites and preview servers, see the companion repository:  \n[https://github.com/LeadCMS/leadcms.nginx](https://github.com/LeadCMS/leadcms.nginx)\n\nThis repository provides sample Nginx configurations and automation for secure deployments.\n\n---\n\n## Questions?\n\nOpen an issue or contact the maintainers.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleadcms%2Fleadcms.deploy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleadcms%2Fleadcms.deploy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleadcms%2Fleadcms.deploy/lists"}