{"id":19247945,"url":"https://github.com/litespeedtech/ols-drupal-env","last_synced_at":"2025-02-23T16:13:48.006Z","repository":{"id":69942024,"uuid":"567028666","full_name":"litespeedtech/ols-drupal-env","owner":"litespeedtech","description":"OpenLiteSpeed Drupal Docker Environment","archived":false,"fork":false,"pushed_at":"2024-10-04T03:24:04.000Z","size":49,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-05T05:25:21.898Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/litespeedtech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2022-11-16T23:14:32.000Z","updated_at":"2024-10-04T03:24:08.000Z","dependencies_parsed_at":"2025-01-05T05:23:59.309Z","dependency_job_id":"22c931bd-6877-4137-a1f5-f02f4f03df0e","html_url":"https://github.com/litespeedtech/ols-drupal-env","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/litespeedtech%2Fols-drupal-env","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/litespeedtech%2Fols-drupal-env/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/litespeedtech%2Fols-drupal-env/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/litespeedtech%2Fols-drupal-env/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/litespeedtech","download_url":"https://codeload.github.com/litespeedtech/ols-drupal-env/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240339583,"owners_count":19785957,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":"2024-11-09T18:05:45.517Z","updated_at":"2025-02-23T16:13:47.971Z","avatar_url":"https://github.com/litespeedtech.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenLiteSpeed Drupal Docker Container\n[![Build Status](https://github.com/litespeedtech/ols-drupal-env/workflows/docker-build/badge.svg)](https://github.com/litespeedtech/ols-drupal-env/actions/new)\n[![docker pulls](https://img.shields.io/docker/pulls/litespeedtech/openlitespeed?style=flat\u0026color=blue)](https://hub.docker.com/r/litespeedtech/openlitespeed)\n[\u003cimg src=\"https://img.shields.io/badge/slack-LiteSpeed-blue.svg?logo=slack\"\u003e](litespeedtech.com/slack) \n[\u003cimg src=\"https://img.shields.io/twitter/follow/litespeedtech.svg?label=Follow\u0026style=social\"\u003e](https://twitter.com/litespeedtech)\n\nInstall a lightweight Drupal container with OpenLiteSpeed Edge or Stable version based on Ubuntu 22.04 Linux.\n\n### Prerequisites\n1. [Install Docker](https://www.docker.com/)\n2. [Install Docker Compose](https://docs.docker.com/compose/)\n\n## Configuration\nEdit the `.env` file to update the demo site domain, default MySQL user, and password.\nFeel free to check [Docker hub Tag page](https://hub.docker.com/repository/docker/litespeedtech/openlitespeed-drush/tags) if you want to update default openlitespeed and php versions. \n\n## Installation\nClone this repository or copy the files from this repository into a new folder:\n```\ngit clone https://github.com/litespeedtech/ols-drupal-env.git\n```\nOpen a terminal, `cd` to the folder in which `docker compose.yml` is saved, and run:\n```\ndocker compose up\n```\n\nNote: If you wish to run a single web server container, please see the [usage method here](https://github.com/litespeedtech/ols-drupal-env/blob/main/ols-dockerfiles/README.md#usage).\n\n## Components\nThe docker image installs the following packages on your system:\n\n|Component|Version|\n| :-------------: | :-------------: |\n|Linux|Ubuntu 24.04|\n|OpenLiteSpeed|[Latest version](https://openlitespeed.org/downloads/)|\n|MariaDB|[Stable version: 10.5](https://hub.docker.com/_/mariadb)|\n|PHP|[Latest version](http://rpms.litespeedtech.com/debian/)|\n|LiteSpeed Cache|[Latest from litespeedtech](https://github.com/litespeedtech/lscache-drupal)|\n|ACME|[Latest from ACME official](https://github.com/acmesh-official/get.acme.sh)|\n|Drupal|[Latest from Drupal](https://www.drupal.org/)|\n|Drush|[Latest from Drush](https://www.drush.org/latest/install/)|\n|phpMyAdmin|[Latest from dockerhub](https://hub.docker.com/r/bitnami/phpmyadmin/)|\n\n## Data Structure\nCloned project \n```bash\n├── acme\n├── bin\n│   └── container\n├── data\n│   └── db\n├── logs\n│   ├── access.log\n│   ├── error.log\n│   ├── lsrestart.log\n│   └── stderr.log\n├── lsws\n│   ├── admin-conf\n│   └── conf\n├── ols-dockerfiles\n│   ├── template\n|   └── README.md\n├── sites\n│   └── localhost\n├── LICENSE\n├── README.md\n└── docker-compose.yml\n```\n\n  * `acme` contains all applied certificates from Lets Encrypt\n\n  * `bin` contains multiple CLI scripts to allow you add or delete virtual hosts, install applications, upgrade, etc \n\n  * `data` stores the MySQL database\n\n  * `logs` contains all of the web server logs and virtual host access logs\n\n  * `lsws` contains all web server configuration files\n\n  * `sites` contains the document roots (the Drupal application will install here)\n\n## Usage\n### Starting a Container\nStart the container with the `up` or `start` methods:\n```\ndocker compose up\n```\nYou can run with daemon mode, like so:\n```\ndocker compose up -d\n```\nThe container is now built and running. \n### Stopping a Container\n```\ndocker compose stop\n```\n### Removing Containers\nTo stop and remove all containers, use the `down` command:\n```\ndocker compose down\n```\n### Setting the WebAdmin Password\nWe strongly recommend you set your personal password right away.\n```\nbash bin/webadmin.sh my_password\n```\n### Starting a Demo Site\nAfter running the following command, you should be able to access the Drupal installation with the configured domain. By default the domain is http://localhost.\n```\nbash bin/demosite.sh\n```\n### Creating a Domain and Virtual Host\n```\nbash bin/domain.sh [-A, --add] example.com\n```\n\u003e Please ignore SSL certificate warnings from the server. They happen if you haven't applied the certificate.\n### Deleting a Domain and Virtual Host\n```\nbash bin/domain.sh [-D, --del] example.com\n```\n### Creating a Database\nYou can either automatically generate the user, password, and database names, or specify them. Use the following to auto generate:\n```\nbash bin/database.sh [-D, --domain] example.com\n```\nUse this command to specify your own names, substituting `user_name`, `my_password`, and `database_name` with your preferred values:\n```\nbash bin/database.sh [-D, --domain] example.com [-U, --user] USER_NAME [-P, --password] MY_PASS [-DB, --database] DATABASE_NAME\n```\n### Installing a Drupal Site\nRun the `database.sh` script for your domain, before you use the following command to install Drupal:\n```\n./bin/appinstall.sh [-A, --app] drupal [-D, --domain] example.com\n```\n### Install ACME \nWe need to run the ACME installation command the **first time only**. \nWith email notification:\n```\n./bin/acme.sh [-I, --install] [-E, --email] EMAIL_ADDR\n```\n### Applying a Let's Encrypt Certificate\nUse the root domain in this command, and it will check for a certificate and automatically apply one with and without `www`:\n```\n./bin/acme.sh [-D, --domain] example.com\n```\n\nOther parameters:\n\n  * [`-r`, `--renew`]: Renew a specific domain with -D or --domain parameter if posibile. To force renew, use -f parameter.\n\n  * [`-R`, `--renew-all`]: Renew all domains if possible. To force renew, use -f parameter.  \n\n  * [`-f`, `-F`, `--force`]: Force renew for a specific domain or all domains. \n\n  * [`-v`, `--revoke`]: Revoke a domain.  \n\n  * [`-V`, `--remove`]: Remove a domain.   \n\n### Update Web Server\nTo upgrade the web server to latest stable version, run the following:\n```\nbash bin/webadmin.sh [-U, --upgrade]\n```\n### Apply OWASP ModSecurity\nEnable OWASP `mod_secure` on the web server: \n```\nbash bin/webadmin.sh [-M, --mod-secure] enable\n```\nDisable OWASP `mod_secure` on the web server: \n```\nbash bin/webadmin.sh [-M, --mod-secure] disable\n```\n\u003ePlease ignore ModSecurity warnings from the server. They happen if some of the rules are not supported by the server.\n### Accessing the Database\nAfter installation, you can use phpMyAdmin to access the database by visiting `http://127.0.0.1:8080` or `https://127.0.0.1:8443`. The default username is `root`, and the password is the same as the one you supplied in the `.env` file.\n\n## Customization\nIf you want to customize the image by adding some packages, e.g. `lsphp83-pspell`, just extend it with a Dockerfile. \n1. We can create a `custom` folder and a `custom/Dockerfile` file under the main project. \n2. Add the following example code to `Dockerfile` under the custom folder\n```\nFROM litespeedtech/openlitespeed-drush:latest\nRUN apt-get update \u0026\u0026 apt-get install lsphp83-pspell -y\n```\n3. Add `build: ./custom` line under the \"image: litespeedtech\" of docker-compose file. So it will looks like this \n```\n  litespeed:\n    image: litespeedtech/openlitespeed-drush:${OLS_VERSION}-${PHP_VERSION}\n    build: ./custom\n```\n4. Build and start it with command:\n```\ndocker compose up --build\n```\n\n## Support \u0026 Feedback\nIf you still have a question after using OpenLiteSpeed Docker, you have a few options.\n* Join [the GoLiteSpeed Slack community](https://litespeedtech.com/slack) for real-time discussion\n* Post to [the OpenLiteSpeed Forums](https://forum.openlitespeed.org/) for community support\n* Reporting any issue on [Github ols-drupal-env](https://github.com/litespeedtech/ols-drupal-env/issues) project\n\n**Pull requests are always welcome** \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flitespeedtech%2Fols-drupal-env","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flitespeedtech%2Fols-drupal-env","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flitespeedtech%2Fols-drupal-env/lists"}