![]() Then, navigate to the front page and add new content > interactive content. Navigate to Configuration > System > H5P ( and then check the two checkboxes labelled Enable H5P development mode and Enable library development directory. Enabling H5P development mode and development folder Upon successful installation, click "Enable newly installed modules", then scroll to the bottom of the page to enable H5P and H5P Editor. Navigate to paste the URL in the "Install from URL" input, then click Install. Locate the latest Drupal 7 plugin at the bottom of the following page. The rest of the installer is self-explanatory. Docker enables us to use this as a hostname, simply referring the name we chose in our docker-compose.yml on line 11. The thing to note here is that we must expand Advanced otions and supply the hostname db instead of localhost. Here we provide the username and password that we have configured for our db service. Proceed to the "Set up database" step of the Drupal installation. ![]() You should now be able to access drupal's web based installer at Note that we haven't mapped any ports for the MySQL container so we cannot connect to it from the host directly, but we also shouldn't currently need to. If they're already running, docker handles this gracefully and simply informs you that they are up-to-date. We have to run the browser based installer, and then we have to install the H5P Plugin and then enable the development folder.Īlso, once this is done, we must initialize the folders under sites/default/files/h5p by adding some content and then we can create a symbolic directory link to /mnt/h5pdev where we have mapped the source code for our content type. So, it's important to note that our compose file and image composition leaves room for improvement because Drupal isn't actually installed yet. Installing Drupal and setting up H5P content type development Introduction The thing about docker is that containers are meant to be disposable and easily reproducible, and so ideally it should be safe to simply destroy a container because you should have a compose file (or a lone Dockerfile) that let's you easily recreate it. You can also simply run docker-compose stop to leave the containers intact, but just stop them. If you want to remove those as well, you can do so with docker-compose down -volumes. Note that the named volumes are left intact. Then add the following contents to docker-compose.yml:ĭocker-compose down Stopping docker-devenv_drupal_1. The file contents for the h5p-greetingcard folder can be gotten from the Hello world tutorial.Īdd the following to the config/uploads.ini file: file_uploads = On Our Compose file is rather small so the contents are probably fairly intuitive just by reading top to bottom.īut first, we'll prepare a simple folder structure that matches the volume mapping in the compose file. Our Compose file will have two services: one web server (Apache with Drupal 7), and one database server (MySQL).Įach service is described and configured, and the format used is YAML. Create a docker compose fileĪ Compose file describes one or more services to be run together, each in their own container, but all connected via their own isolated network so that they can communicate (docker sets this up automagically). Once it's up and running, view it in your browser at whichever port you ended up mapping). ![]() If you have another process using port 80 just change the port number in front of the colon to bind to another. This will download the docker/getting-started image from Docker hub, and immediately start a new container with it, and will map port 80 on your machine to port 80 of the container. If you're using Docker Desktop for Windows, this exact command is thrown in your face pretty clearly when you're viewing the Docker Dashboard GUI after installing, and no containers are running.ĭocker run -dp 80:80 docker/getting-started Once you have docker installed, you can launch it with the following command. If you're completely new to using docker, I recommend going through the official Getting started guide. I'm using Windows 11 with WSL 2 to run the latest Ubuntu (20.04 as of this writing). Install Docker Desktop for your platform. ![]() ![]() However, this setup is much more lightweight (and faster!) compared to using full VMs with VirtualBox. This is a rather basic setup using only prebuilt images for drupal and mysql, and as such is surprisingly simple! The caveat is that there are a few manual steps for installation via the browser the first time we run it. This article gives details on how to use docker-compose to spin up containers that make up a development environment for H5P Content Types. H5P Content Type development using docker-compose ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |