Adding a theme in docker ojs 3.5

Describe the issue or problem
Please tell us what happens and what you expected to happen.

I follow the instructions to install OJS with docker:

https://github.com/pkp/containers

I get OJS to run locally, but now I want to add a theme and after that I want to create a new theme but for all this task I need to add themes to my local installation. I follow this post:

But I cant see the theme in administration.

Steps I took leading up to the issue
1-
I put theme in:
volumes/public/plugins/themes/bootstrap3

2- add this line en the file docker-compose.yml

- ./volumes/public/plugins/themes/bootstrap3:/var/www/html/plugins/themes/bootstrap3

3- Restart docker or even stop and start docker. and nothing.

What application are you using?
OJS 3.5

Hi @Koffer,

off the top of my head - don’t you also have to remove and recreate the existing container after changing the bind mounts? If yes and if you haven’t done this already, then try stopping the running instance, then look for the container with the OJS in docker ps -a and remove it with docker rm … (if you’re using the official images, you only need to remove the one with apache and OJS, the one with the database is irrelevant here), and then after docker compose up the new volume should be mounted to the recreated OJS container.

Also to keep in mind: docker compose stop and Ctrl-C-ing the noninteractive docker compose session both keep the containers in the stopped state, and docker compose down is supposed to also delete the stopped containers.

Thansk a lot of for your instructions. already get the boostrap theme added, but I need to install again both image. When i try to delete only the app image It sends me to the installation page and get error about “tables already are create”.
In this case I delete both image and begin again.
Now my doubt is about, if is posible to mouth a more general volume like:

/volumes/public/plugins/themes:/var/www/html/plugins/themes

To add more themes or create themes without needing to reinstall everything again.

I may be mistaken, but as far as I remember the only thing that determines whether the OJS is installed or not is the installed = On setting inside the config.inc.php. So with this and the old config.inc.php the system shouldn’t send you to the installation page when you recreate the app container. You may have to check whether you are mounting config.inc.php to your container to keep the essential OJS settings persistent. Remember that when you are mounting a single file into the container, it should exist on the host before you create the container; otherwise, a folder will be created on the host and things will not work as intended.

You can create any general volume, and if you’re mounting a volume that doesn’t yet exist on the host, the container should populate the volume with its content, but if the volume (folder) exists on the host already, its content will replace the corresponding destination in the container, as described here. This will make the volume and your theme changes persistent, which is what you need.

You probably don’t want to mount anything from ./volumes/public though, because it serves another purpose and is typically mounted to /var/www/html/public that is the public folder accessible from the web. Something like

./volumes/themes:/var/www/html/plugins/themes

should work. And don’t forget the starting dot in the host path to make the path relative.