{"id":50479166,"url":"https://github.com/etherbeing/plus-moodle","last_synced_at":"2026-06-01T16:02:56.131Z","repository":{"id":342766774,"uuid":"1175095431","full_name":"etherbeing/plus-moodle","owner":"etherbeing","description":null,"archived":false,"fork":false,"pushed_at":"2026-03-07T12:37:32.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-07T15:41:23.392Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/etherbeing.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-07T08:10:30.000Z","updated_at":"2026-03-07T12:37:35.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/etherbeing/plus-moodle","commit_stats":null,"previous_names":["etherbeing/plus-moodle"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/etherbeing/plus-moodle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etherbeing%2Fplus-moodle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etherbeing%2Fplus-moodle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etherbeing%2Fplus-moodle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etherbeing%2Fplus-moodle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/etherbeing","download_url":"https://codeload.github.com/etherbeing/plus-moodle/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etherbeing%2Fplus-moodle/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33782317,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-01T02:00:06.963Z","response_time":115,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":"2026-06-01T16:02:55.044Z","updated_at":"2026-06-01T16:02:56.114Z","avatar_url":"https://github.com/etherbeing.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Plus Moodle Automation\n\nThis repository treats the Moodle source as a submodule and layers Docker, Docker Compose, Docker Swarm, and GitHub Actions automation on top so you can keep a production-grade instance aligned with `main`.\n\n## Quick start\n\n1. Copy the environment template and fill in the runtime values (or use the helper below):\n   ```bash\n   ./scripts/generate-env.sh\n   ```\n   This creates `.env` from `.env.example` and populates `MOODLE_ADMIN_PASS`, `DB_PASSWORD`, and `DB_ROOT_PASSWORD` with cryptographically-secure randomness. Pass `--force` to regenerate secrets.\n2. Pull the Moodle submodule (defaults to `MOODLE_BRANCH` in `.env`):\n   ```bash\n   ./scripts/update-submodules.sh\n   ```\n3. Start the stack locally for dev/testing:\n   ```bash\n   ./scripts/deploy.sh\n   ```\n   The nginx proxy listens on `127.0.0.1:8080` so you can expose it through your own reverse proxy if needed.\n\n## Deploying to Docker Swarm\n\n1. Install the repo on your Swarm manager and configure the same `.env` values there.\n2. Deploy the stack:\n   ```bash\n   ./scripts/deploy-stack.sh [stack-name]\n   ```\n   If no name is provided it reads `STACK_NAME` from `.env` (default `moodle`).\n3. The Swarm stack uses `stack.yml` and publishes only on `127.0.0.1:8080`, making it easy to attach any external proxy.\n\n## GitHub Actions CI/CD\n\n- Pushes to `main` build and push the Docker image to `ghcr.io/${{ github.repository }}` tagged with `latest` plus the commit SHA.\n- The `deploy` job SSHs into `SWARM_HOST`, pulls the latest image, and runs `docker stack deploy --with-registry-auth -c stack.yml` using `STACK_NAME` from `.env`.\n- Required secrets: `SWARM_HOST`, `SWARM_USER`, `SWARM_SSH_KEY`, `SWARM_PORT`, `SWARM_PROJECT_PATH`, and optional `GHCR_PAT` for private image pulls.\n\n## Environment generation script\n\n`scripts/generate-env.sh` mirrors `.env.example` and uses Python's `secrets` module to populate the admin and database passwords with cryptographically secure values (run with `--force` to regenerate). This keeps deployments from accidentally reusing weak credentials.\n\n## Notes\n\n- `.env.example` documents the values that feed both Compose and Swarm stacks. Keep `MOODLE_IMAGE` pointed at the registry value you push from GitHub Actions.\n- The Docker image bundles Moodle's PHP dependencies, Composer, and cron so you can redeploy by simply updating the submodule and reinvoking the automation scripts.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fetherbeing%2Fplus-moodle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fetherbeing%2Fplus-moodle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fetherbeing%2Fplus-moodle/lists"}