{"id":13580489,"url":"https://github.com/litespeedtech/ols-docker-env","last_synced_at":"2025-05-16T08:05:03.447Z","repository":{"id":37985583,"uuid":"158457987","full_name":"litespeedtech/ols-docker-env","owner":"litespeedtech","description":"OpenLiteSpeed Docker Environment","archived":false,"fork":false,"pushed_at":"2025-05-07T03:00:08.000Z","size":189,"stargazers_count":218,"open_issues_count":3,"forks_count":146,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-05-07T04:18:34.490Z","etag":null,"topics":["docker","docker-compose","docker-image","openlitespeed","wordpress"],"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,"zenodo":null}},"created_at":"2018-11-20T22:13:55.000Z","updated_at":"2025-05-07T03:00:12.000Z","dependencies_parsed_at":"2023-01-23T09:45:11.181Z","dependency_job_id":"bae8716d-205d-4f2c-9313-376ddc0153b6","html_url":"https://github.com/litespeedtech/ols-docker-env","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/litespeedtech%2Fols-docker-env","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/litespeedtech%2Fols-docker-env/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/litespeedtech%2Fols-docker-env/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/litespeedtech%2Fols-docker-env/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/litespeedtech","download_url":"https://codeload.github.com/litespeedtech/ols-docker-env/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254493378,"owners_count":22080126,"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":["docker","docker-compose","docker-image","openlitespeed","wordpress"],"created_at":"2024-08-01T15:01:52.320Z","updated_at":"2025-05-16T08:04:58.436Z","avatar_url":"https://github.com/litespeedtech.png","language":"Shell","readme":"# OpenLiteSpeed WordPress Docker Container\n[![Build Status](https://github.com/litespeedtech/ols-docker-env/workflows/docker-build/badge.svg)](https://github.com/litespeedtech/ols-docker-env/actions/)\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 WordPress container with OpenLiteSpeed Edge or Stable version based on Ubuntu 24.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/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-docker-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-dockerfiles#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://hub.docker.com/r/litespeedtech/openlitespeed)|\n|MariaDB|[Stable version: 11.4](https://hub.docker.com/_/mariadb)|\n|PHP|[Latest version](http://rpms.litespeedtech.com/debian/)|\n|LiteSpeed Cache|[Latest from WordPress.org](https://wordpress.org/plugins/litespeed-cache/)|\n|ACME|[Latest from ACME official](https://github.com/acmesh-official/get.acme.sh)|\n|WordPress|[Latest from WordPress](https://wordpress.org/download/)|\n|phpMyAdmin|[Latest from dockerhub](https://hub.docker.com/r/bitnami/phpmyadmin/)|\n|Redis|[Latest from dockerhub](https://hub.docker.com/_/redis/)|\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├── 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 WordPress 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 WordPress 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 WordPress Site\nTo preconfigure the `wp-config` file, run the `database.sh` script for your domain, before you use the following command to install WordPress:\n```\n./bin/appinstall.sh [-A, --app] wordpress [-D, --domain] example.com\n```\n\n### Connecting to Redis \nGo to [WordPress \u003e LSCache Plugin \u003e Cache \u003e Object](https://docs.litespeedtech.com/lscache/lscwp/cache/#object-tab), select **Redis** method and input `redis` to the Host field. \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: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-composefile. So it will looks like this \n```\n  litespeed:\n    image: litespeedtech/openlitespeed:${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-docker-env](https://github.com/litespeedtech/ols-docker-env/issues) project\n\n**Pull requests are always welcome** \n","funding_links":[],"categories":["Shell"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flitespeedtech%2Fols-docker-env","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flitespeedtech%2Fols-docker-env","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flitespeedtech%2Fols-docker-env/lists"}