{"id":24516048,"url":"https://github.com/damalis/full-stack-apache2-drupal-for-everyone-with-docker-compose","last_synced_at":"2026-04-12T13:33:07.588Z","repository":{"id":60116819,"uuid":"539886845","full_name":"damalis/full-stack-apache2-drupal-for-everyone-with-docker-compose","owner":"damalis","description":"If You want to build a website with Drupal at short time; install full stack apache2 Drupal with Docker Compose. Plus, manage docker containers with Portainer.","archived":false,"fork":false,"pushed_at":"2024-07-07T07:29:40.000Z","size":134,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-22T01:22:34.333Z","etag":null,"topics":["apache2","certbot","drupal","framework","letsencrypt","mariadb","mysql","php","php-fpm","phpmyadmin","portainer-ce","redis","ssl","varnish"],"latest_commit_sha":null,"homepage":"","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/damalis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["damalis"]}},"created_at":"2022-09-22T08:54:08.000Z","updated_at":"2024-07-06T18:37:04.000Z","dependencies_parsed_at":"2024-03-02T09:33:51.323Z","dependency_job_id":"c266cbb3-2743-4f41-b8c2-bb96bc61061c","html_url":"https://github.com/damalis/full-stack-apache2-drupal-for-everyone-with-docker-compose","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damalis%2Ffull-stack-apache2-drupal-for-everyone-with-docker-compose","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damalis%2Ffull-stack-apache2-drupal-for-everyone-with-docker-compose/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damalis%2Ffull-stack-apache2-drupal-for-everyone-with-docker-compose/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damalis%2Ffull-stack-apache2-drupal-for-everyone-with-docker-compose/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/damalis","download_url":"https://codeload.github.com/damalis/full-stack-apache2-drupal-for-everyone-with-docker-compose/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243719373,"owners_count":20336596,"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":["apache2","certbot","drupal","framework","letsencrypt","mariadb","mysql","php","php-fpm","phpmyadmin","portainer-ce","redis","ssl","varnish"],"created_at":"2025-01-22T01:20:46.617Z","updated_at":"2026-04-12T13:33:07.580Z","avatar_url":"https://github.com/damalis.png","language":"Shell","funding_links":["https://github.com/sponsors/damalis"],"categories":[],"sub_categories":[],"readme":"# [full stack apache2 Drupal for everyone with docker compose](https://github.com/damalis/full-stack-apache2-drupal-for-everyone-with-docker-compose)\n\nIf You want to build a website with Drupal at short time;\n\n#### Full stack Apache2 Drupal:\n\u003cp align=\"left\"\u003e\n\u003ca href=\"https://drupal.org/\" target=\"_blank\" rel=\"noreferrer\"\u003e \u003cimg src=\"https://raw.githubusercontent.com/docker-library/docs/e405066455691ca2429eb8094777f12d2dad8f91/drupal/logo.svg?sanitize=true\" alt=\"Drupal\" height=\"40\" width=\"40\"/\u003e \u003c/a\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp; \n\u003ca href=\"https://docs.docker.com/compose/\" target=\"_blank\" rel=\"noreferrer\"\u003e \u003cimg src=\"https://raw.githubusercontent.com/docker/compose/v2/logo.png\" alt=\"docker compose\" width=\"40\" height=\"40\" width=\"40\"/\u003e \u003c/a\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp; \n\u003ca href=\"https://mariadb.org/\" target=\"_blank\" rel=\"noreferrer\"\u003e \u003cimg src=\"https://avatars.githubusercontent.com/u/5877084?s=200\u0026v=4\" alt=\"mariadb\" height=\"50\" width=\"50\"/\u003e \u003c/a\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp; \n\u003ca href=\"https://dev.mysql.com/\" target=\"_blank\" rel=\"noreferrer\"\u003e \u003cimg src=\"https://avatars.githubusercontent.com/u/2452804?s=200\u0026v=4\" alt=\"mysql\" height=\"50\" width=\"50\"/\u003e \u003c/a\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp; \n\u003ca href=\"https://www.apache.org\" target=\"_blank\" rel=\"noreferrer\"\u003e \u003cimg src=\"https://avatars.githubusercontent.com/u/47359?s=200\u0026v=4\" alt=\"apache2\" height=\"40\" width=\"40\"/\u003e \u003c/a\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp; \n\u003ca href=\"https://www.php.net\" target=\"_blank\" rel=\"noreferrer\"\u003e \u003cimg src=\"https://avatars.githubusercontent.com/u/25158?s=200\u0026v=4\" alt=\"php\" height=\"40\" width=\"40\"/\u003e \u003c/a\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp; \n\u003ca href=\"https://redis.io\" target=\"_blank\" rel=\"noreferrer\"\u003e \u003cimg src=\"https://avatars.githubusercontent.com/u/1529926?s=200\u0026v=4\" alt=\"redis\" height=\"40\" width=\"40\"/\u003e \u003c/a\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp; \n\u003ca href=\"https://www.varnish-software.com/\" target=\"_blank\" rel=\"noreferrer\"\u003e \u003cimg src=\"https://avatars.githubusercontent.com/u/577014?s=200\u0026v=4\" alt=\"varnish\" height=\"40\" width=\"40\"/\u003e \u003c/a\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp; \n\u003ca href=\"#\" target=\"_blank\" rel=\"noreferrer\"\u003e \u003cimg src=\"https://raw.githubusercontent.com/github/explore/80688e429a7d4ef2fca1e82350fe8e3517d3494d/topics/bash/bash.png\" alt=\"Bash\" height=\"50\" width=\"50\" /\u003e \u003c/a\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp; \n\u003ca href=\"https://www.phpmyadmin.net/\" target=\"_blank\" rel=\"noreferrer\"\u003e \u003cimg src=\"https://avatars.githubusercontent.com/u/1351977?s=200\u0026v=4\" alt=\"phpmyadmin\" height=\"40\" width=\"40\"/\u003e \u003c/a\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp; \n\u003ca href=\"https://certbot.eff.org/\" target=\"_blank\" rel=\"noreferrer\"\u003e \u003cimg src=\"https://avatars.githubusercontent.com/u/17889013?s=200\u0026v=4\" alt=\"certbot\" height=\"40\" width=\"40\"/\u003e \u003c/a\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp; \n\u003ca href=\"https://letsencrypt.org/\" target=\"_blank\" rel=\"noreferrer\"\u003e \u003cimg src=\"https://avatars.githubusercontent.com/u/9289019?s=200\u0026v=4\" alt=\"letsencrypt\" height=\"40\" width=\"40\"/\u003e \u003c/a\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\n\u003ca href=\"https://www.portainer.io/?hsLang=en\" target=\"_blank\" rel=\"noreferrer\"\u003e \u003cimg src=\"https://avatars.githubusercontent.com/u/22225832?s=200\u0026v=4\" alt=\"portainer\" height=\"40\" width=\"40\"/\u003e \u003c/a\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp; \n\u003ca href=\"https://www.offen.dev/\" target=\"_blank\" rel=\"noreferrer\"\u003e \u003cimg src=\"https://avatars.githubusercontent.com/u/47735043?s=200\u0026v=4\" alt=\"backup\" height=\"35\" width=\"35\"/\u003e \u003c/a\u003e\n\u003c/p\u003e\n\nPlus, manage docker containers with Portainer.\n\n#### Supported CPU architectures:\n\u003cp align=\"left\"\u003e arm64/aarch64, x86-64 \u003c/p\u003e\n\n#### Supported Linux Package Manage Systems:\n\u003cp align=\"left\"\u003e apk, dnf, yum, apt/apt-get/dpkg, zypper, pacman \u003c/p\u003e\n\n#### Supported Linux Distributions:\n\u003cp align=\"left\"\u003e centos, debian, fedora, raspbian, rhel, sles, static, ubuntu \u003c/p\u003e\n \n#### Supported Linux Operation Systems:\n\u003cp align=\"left\"\u003e\n\u003ca href=\"https://alpinelinux.org/\" target=\"_blank\" rel=\"noreferrer\"\u003e \u003cimg src=\"https://avatars.githubusercontent.com/u/7600810?s=200\u0026v=4\" alt=\"alpine linux\" height=\"40\" width=\"40\"/\u003e \u003c/a\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp; \n\u003ca href=\"https://fedoraproject.org/\" target=\"_blank\" rel=\"noreferrer\"\u003e \u003cimg src=\"https://raw.githubusercontent.com/github/explore/e6b1e7f0fb8d0bf920bd719c7289243138bdc1b4/topics/fedora/fedora.png\" alt=\"fedora\" height=\"40\" width=\"40\"/\u003e \u003c/a\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp; \n\u003ca href=\"https://www.centos.org/\" target=\"_blank\" rel=\"noreferrer\"\u003e \u003cimg src=\"https://avatars.githubusercontent.com/u/79192?s=200\u0026v=4\" alt=\"centos\" height=\"40\" width=\"40\"/\u003e \u003c/a\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp; \n\u003ca href=\"https://www.debian.org/\" target=\"_blank\" rel=\"noreferrer\"\u003e \u003cimg src=\"https://avatars.githubusercontent.com/u/1854028?s=200\u0026v=4\" alt=\"debian\" height=\"40\" width=\"40\"/\u003e \u003c/a\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp; \n\u003ca href=\"https://ubuntu.com/\" target=\"_blank\" rel=\"noreferrer\"\u003e \u003cimg src=\"https://avatars.githubusercontent.com/u/4604537?s=200\u0026v=4\" alt=\"ubuntu\" height=\"40\" width=\"40\"/\u003e \u003c/a\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp; \n\u003ca href=\"https://www.raspberrypi.com/\" target=\"_blank\" rel=\"noreferrer\"\u003e \u003cimg src=\"https://avatars.githubusercontent.com/u/1294177?s=200\u0026v=4\" alt=\"ubuntu\" height=\"40\" width=\"40\"/\u003e \u003c/a\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp; \n\u003ca href=\"https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux\" target=\"_blank\" rel=\"noreferrer\"\u003e \u003cimg src=\"https://avatars.githubusercontent.com/u/33972111?s=200\u0026v=4\" alt=\"redhat on s390x (IBM Z)\" height=\"40\" width=\"40\"/\u003e \u003c/a\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp; \n\u003ca href=\"https://www.suse.com/products/server/\" target=\"_blank\" rel=\"noreferrer\"\u003e \u003cimg src=\"https://avatars.githubusercontent.com/u/623819?s=200\u0026v=4\" alt=\"opensuse on s390x (IBM Z)\" height=\"40\" width=\"40\"/\u003e \u003c/a\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp; \n\u003ca href=\"https://archlinux.org/\" target=\"_blank\" rel=\"noreferrer\"\u003e \u003cimg src=\"https://gitlab.archlinux.org/uploads/-/system/group/avatar/23/iconfinder_archlinux_386451.png?width=48\" alt=\"arch linux\" height=\"40\" width=\"40\"/\u003e \u003c/a\u003e\n\u003c/p\u003e\n\n##### Note: Fedora 37, 39 and alpine linux x86-64 compatible, could not try sles IBM Z s390x, rhel IBM Z s390x and raspberrypi.\n##### After installing the repository, a system reboot is required on Red Hat OS, Arch Linux.\n\n#### With this project you can quickly run the following:\n\n- [Drupal](https://hub.docker.com/_/drupal) - [php-fpm](https://hub.docker.com/_/php)\n- [webserver (apache2/httpd)](https://hub.docker.com/_/httpd)\n- [certbot (letsencrypt)](https://hub.docker.com/r/certbot/certbot)\n- [phpMyAdmin](https://hub.docker.com/r/phpmyadmin/phpmyadmin/)\n- [Mariadb](https://hub.docker.com/_/mariadb) [Mysql](https://hub.docker.com/_/mysql)\n- [redis](https://hub.docker.com/_/redis)\n- [varnish](https://hub.docker.com/_/varnish)\n- [backup](https://hub.docker.com/r/offen/docker-volume-backup)\n\n#### For certbot (letsencrypt) certificate:\n\n- [Set DNS configuration of your domain name](https://support.google.com/a/answer/48090?hl=en)\n\n#### IPv4/IPv6 Firewall\nCreate rules to open ports to the internet, or to a specific IPv4 address or range.\n\n- http: 80\n- https: 443\n- portainer: 9001\n- phpmyadmin: 9090\n\n#### Contents:\n\n- [Auto Configuration and Installation](#automatic)\n- [Manual Configuration and Installation](#manual)\n\t- [Requirements](#requirements)\n\t- [Configuration](#configuration)\n\t- [Installation](#installation)\n- [Portainer Installation](#portainer)\n- [Usage](#usage)\n\t- [Website](#website)\n\t- [Webserver](#webserver)\n\t- [Database](#database)\n\t- [Redis](#redis)\n\t- [Varnish](#varnish)\n\t- [phpMyAdmin](#phpmyadmin)\n\t- [backup](#backup)\n\n### Automatic\n\n#### Exec install shell script for auto installation and configuration\n\ndownload with\n\n```\ngit clone https://github.com/damalis/full-stack-apache2-drupal-for-everyone-with-docker-compose.git\n```\n\nOpen a terminal and `cd` to the folder in which `docker-compose.yml` is saved and run:\n\n```\ncd full-stack-apache2-drupal-for-everyone-with-docker-compose\nchmod +x install.sh\nLC_ALL=C.UTF-8 ./install.sh # LC_ALL=C.UTF-8 if not os language english\n```\n\n### Manual\n\n#### Requirements\n\nMake sure you have the latest versions of **Docker** and **Docker Compose** installed on your machine.\n\n- [How install docker](https://docs.docker.com/engine/install/)\n- [How install docker compose](https://docs.docker.com/compose/install/)\n\nClone this repository or copy the files from this repository into a new folder.\n\nMake sure to [add your user to the `docker` group](https://docs.docker.com/install/linux/linux-postinstall/#manage-docker-as-a-non-root-user).\n\n#### Configuration\n\ndownload with\n\n```\ngit clone https://github.com/damalis/full-stack-apache2-drupal-for-everyone-with-docker-compose.git\n```\n\nOpen a terminal and `cd` to the folder in which `docker-compose.yml` is saved and run:\n\n```\ncd full-stack-apache2-drupal-for-everyone-with-docker-compose\n```\n\nCopy the example environment into `.env`\n\n```\ncp env.example .env\n```\n\nEdit the `.env` file to change values of \n\n|```LOCAL_TIMEZONE```|```DOMAIN_NAME```|```DIRECTORY_PATH```|```LETSENCRYPT_EMAIL```|\n|```DB_USER```|```DB_PASSWORD```|```DB_NAME```|```MYSQL_ROOT_PASSWORD```|```DATABASE_IMAGE_NAME```|\n|```DATABASE_CONT_NAME```|```DATABASE_PACKAGE_MANAGER```|```DATABASE_ADMIN_COMMANDLINE```|```PMA_CONTROLUSER```|```PMA_CONTROLPASS```|\n|```PMA_HTPASSWD_USERNAME```|```PMA_HTPASSWD_PASSWORD```|```VARNISH_VERSION```|```SSL_SNIPPET```|\n\n\u003ctable\u003e\u003cthead\u003e\n  \u003ctr\u003e\n    \u003cth\u003eVariable \u003c/th\u003e\n    \u003cth colspan=\"2\"\u003eValue\u003c/th\u003e\n  \u003c/tr\u003e\u003c/thead\u003e\n\u003ctbody\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ccode\u003eLOCAL_TIMEZONE\u003c/code\u003e\u003c/td\u003e\n    \u003ctd colspan=\"2\"\u003e\u003ccode\u003e\u003ca href=\"https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List\" rel=\"nofollow\"\u003eto see local timezones\u003c/a\u003e\u003c/code\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ccode\u003eDIRECTORY_PATH\u003c/code\u003e\u003c/td\u003e\n    \u003ctd colspan=\"2\"\u003e\u003ccode\u003epwd\u003c/code\u003e at command line\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ccode\u003eDATABASE_IMAGE_NAME\u003c/code\u003e\u003c/td\u003e\n    \u003ctd colspan=\"2\"\u003e\u003ccode\u003emariadb\u003c/code\u003e or \u003ccode\u003emysql\u003c/code\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ccode\u003eDATABASE_CONT_NAME\u003c/code\u003e\u003c/td\u003e\n    \u003ctd colspan=\"2\"\u003e\u003ccode\u003emariadb\u003c/code\u003e, \u003ccode\u003emysql\u003c/code\u003e or \u003ccode\u003e\u003ca href=\"https://docs.docker.com/reference/compose-file/services/#container_name\" rel=\"nofollow\" alt=\"custom name\"\u003ecustom name\u003c/a\u003e\u003c/code\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd rowspan=\"2\"\u003e\u003ccode\u003eDATABASE_PACKAGE_MANAGER\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003emariadb\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003eapt-get update \u0026\u0026 apt-get install -y gettext-base\u003c/code\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003emysql\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003emicrodnf update -y \u0026\u0026 microdnf install -y gettext\u003c/code\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd rowspan=\"2\"\u003e\u003ccode\u003eDATABASE_ADMIN_COMMANDLINE\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003emariadb\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003emariadb-admin\u003c/code\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003emysql\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003emysqladmin\u003c/code\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd rowspan=\"2\"\u003e\u003ccode\u003eVARNISH_VERSION\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003ecentos version 9+ and fedora\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003elatest\u003c/code\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003ethe others\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003estable\u003c/code\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd rowspan=\"2\"\u003e\u003ccode\u003eSSL_SNIPPET\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003elocalhost\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003eecho 'Generated Self-signed SSL Certificate at localhost'\u003c/code\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eremotehost\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003ecertbot certonly --webroot --webroot-path /tmp/acme-challenge --rsa-key-size 4096 --non-interactive --agree-tos --no-eff-email --force-renewal --email ${LETSENCRYPT_EMAIL} -d ${DOMAIN_NAME} -d www.${DOMAIN_NAME}\u003c/code\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\n#### Installation\n\nFirstly: will create external volume\n\n```\ndocker volume create --driver local --opt type=none --opt device=${PWD}/certbot --opt o=bind certbot-etc\n```\n\nLocalhost ssl: Generate Self-signed SSL Certificate with guide [mkcert repository](https://github.com/FiloSottile/mkcert).\n\n```\ndocker compose up -d\n```\n\nthen reloading for webserver ssl configuration\n\n```\ndocker container restart webserver\n```\n\nThe containers are now built and running. You should be able to access the Drupal installation with the configured IP in the browser address. `https://DOMAIN_NAME`.\n\nFor convenience you may add a new entry into your hosts file.\n\n### Portainer\n\n```\ndocker compose -f portainer-docker-compose.yml -p portainer up -d \n```\n\nmanage docker with [Portainer](https://www.portainer.io/) is the definitive container management tool for Docker, Docker Swarm with it's highly intuitive GUI and API. \n\nYou can also visit `https://DOMAIN_NAME:9001` to access portainer after starting the containers.\n\n### Usage\n\n#### You could manage docker containers without command line with portainer.\n\n#### Here’s a quick reference of commonly used Docker Compose commands\n\n```\ndocker ps -a # Lists all containers managed by the compose file\n```\n\n```\ndocker compose start # Starts previously stopped containers\n```\n\n```\ndocker compose stop # Stops all running containers\n```\n\n```\ndocker compose down # Stops and removes containers, networks, etc.\n```\n\n```\ndocker compose down -v # Add --volumes to remove volumes explicitly\n```\n\n```\ndocker rm -f $(docker ps -a -q) # Removes portainer and the other containers\n```\n\n```\ndocker volume rm $(docker volume ls -q) # Removes all volumes\n```\n\n```\ndocker network prune # Remove all unused networks\n```\n\n```\ndocker system prune # Removes unused data (containers, networks, images, and optionally volumes)\n```\n\n```\ndocker system prune -a # Removes all unused images, not just dangling ones\n```\n\n```\ndocker rmi $(docker image ls -q) # Removes portainer and the other images\n```\n\n```\ndocker container logs container_name_or_id # Shows logs from all services\n```\n\n#### Project from existing source\n\nCopy all files into a new directory:\n\n```\ndocker compose up -d # Starts services in detached mode (in the background)\n```\n\n#### Docker run reference\n\n[https://docs.docker.com/reference/cli/docker/compose/](https://docs.docker.com/reference/cli/docker/compose/)\n\n#### Website\n\nYou should see the \"Drupal installation\" page in your browser. If not, please check if your PHP installation satisfies Drupal's requirements.\n\n```\nhttps://DOMAIN_NAME\n```\n\nadd or remove code in the ./php-fpm/php/conf.d/security.ini file for custom php.ini configurations\n\n[https://www.php.net/manual/en/configuration.file.php](https://www.php.net/manual/en/configuration.file.php)\n\nYou should make changes custom host configurations ```./php-fpm/php-fpm.d/z-www.conf``` then must restart service, FPM uses php.ini syntax for its configuration file - php-fpm.conf, and pool configuration files.\n\n[https://www.php.net/manual/en/install.fpm.configuration.php](https://www.php.net/manual/en/install.fpm.configuration.php)\n\n```\ndocker container restart drupal\n```\n\nadd and/or remove drupal site folders and files with any ftp client program in ```./drupal``` folder.\n\u003cbr /\u003eYou can also visit `https://DOMAIN_NAME` to access website after starting the containers.\n\n#### Webserver\n\nadd or remove code in the ```./webserver/extra/httpd-ssl.conf``` file for custom apache2/httpd configurations\n\n[https://httpd.apache.org/docs/2.4/](https://httpd.apache.org/docs/2.4/)\n\n#### Database\n\nADVANCED OPTIONS -\u003e |```Host: database```|```Username: DB_USER```|```Password: DB_PASSWORD```|\n\n[https://mariadb.com/kb/en/configuring-mariadb-with-option-files/](https://mariadb.com/kb/en/configuring-mariadb-with-option-files/)\n\n[https://dev.mysql.com/doc/](https://dev.mysql.com/doc/)\n\n#### Redis\n\nat page https://DOMAIN_NAME/en/admin/modules, filter: redis and check then install.\n\nif there isn't these lines, Edit Drupal settings file: ```./drupal/sites/default/settings.php``` and add these lines at the bottom of the file:\n\n```\n$settings['redis.connection']['interface'] = 'PhpRedis';\n// Host ip address.\n$settings['redis.connection']['host'] = 'redis';\n$settings['cache']['default'] = 'cache.backend.redis';\n// Redis port.\n$settings['redis.connection']['port'] = '6379';\n$settings['redis.connection']['base'] = 12;\n// Password of redis updated in php.ini file.\n// $settings['redis.connection']['password'] = \"password\";\n$settings['cache']['bins']['bootstrap'] = 'cache.backend.chainedfast';\n$settings['cache']['bins']['discovery'] = 'cache.backend.chainedfast';\n$settings['cache']['bins']['config'] = 'cache.backend.chainedfast';\n```\n\nCreate ```./drupal/sites/default/files/services.yml``` inisde default folder and add the below code in it.\n\n```\nservices:\n\t# Cache tag checksum backend. Used by redis and most other cache backend\n\t# to deal with cache tag invalidations.\n\tcache_tags.invalidator.checksum:\n\t\tclass: Drupal\\redis\\Cache\\RedisCacheTagsChecksum\n\t\targuments: ['@redis.factory']\n\t\ttags:\n\t\t\t- { name: cache_tags_invalidator }\n\n\t# Replaces the default lock backend with a redis implementation.\n\tlock:\n\t\tclass: Drupal\\Core\\Lock\\LockBackendInterface\n\tfactory: ['@redis.lock.factory', get]\n\n\t# Replaces the default persistent lock backend with a redis implementation.\n\tlock.persistent:\n\t\tclass: Drupal\\Core\\Lock\\LockBackendInterface\n\t\tfactory: ['@redis.lock.factory', get]\n\t\targuments: [true]\n\n\t# Replaces the default flood backend with a redis implementation.\n\tflood:\n\tclass: Drupal\\Core\\Flood\\FloodInterface\n\tfactory: ['@redis.flood.factory', get]\n```\n\n#### Varnish\n\nat page https://DOMAIN_NAME/en/admin/modules, filter: purge and check then install.\n\nVarnish Server Hostname: |```varnish```|\n\nVarnish Server Port: |```8080```|\n\nScheme: |```http```|\n\n[This link is to complete configure Varnish](https://www.varnish-software.com/developers/tutorials/configuring-varnish-drupal/#4-configure-caching-and-purging-in-drupal)\n\nAll necessary changes to sites/default and sites/default/settings.php have been made, so you should remove write permissions to them now in order to avoid security risks.\n\n```\nsudo chmod 655 ./drupal/sites/default/settings.php\n```\n\n#### phpMyAdmin\n\nYou can add your own custom config.inc.php settings (such as Configuration Storage setup) by creating a file named config.user.inc.php with the various user defined settings in it, and then linking it into the container using:\n\n```\n./phpmyadmin/config.user.inc.php\n```\n\nYou can also visit `https://DOMAIN_NAME:9090` to access phpMyAdmin after starting the containers.\n\nThe first authorize screen(htpasswd;username or password) and phpmyadmin login screen the username and the password is the same as supplied in the `.env` file.\n\n#### backup\n\nThis will back up the all files and folders in database/dump sql and html volumes, once per day, and write it to ```./backups``` with a filename like backup-2023-01-01T10-18-00.tar.gz\n\n##### can run on a custom cron schedule\n\n```BACKUP_CRON_EXPRESSION: '20 01 * * *'``` the UTC timezone.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdamalis%2Ffull-stack-apache2-drupal-for-everyone-with-docker-compose","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdamalis%2Ffull-stack-apache2-drupal-for-everyone-with-docker-compose","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdamalis%2Ffull-stack-apache2-drupal-for-everyone-with-docker-compose/lists"}