docker: drupal site doesnt survive a restart
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
Research direction
Start with the provided docker-compose configuration and the commands used to copy and mount /var/www/html/sites. Check how the Drupal and PostgreSQL containers handle their data across a restart. Done means the existing site and its content return after restarting the containers instead of showing the installation page.
Written by the indexing model from the issue text.
Description
Hello,
i use this docker image to run a container from: https://hub.docker.com/_/drupal
i have then run this command: docker run --rm drupal tar -cC /var/www/html/sites . | tar -xC /path/on/host/sites and mounted it as /var/www/html/sites
However, when the container gets restarted, it shows the installation page instead of the site with its content.
Does anyone know what i do wrong? I would expect the site returns to its normal status as there's site specific data in the sites folder thats beeing mounted.
here is my docker-compose file for completeness:
version: '3'
services:
drupal:
container_name: <CONTAINERNAME>
image: drupal:9.3-php8.0
ports:
- 8081:80
volumes:
- ./modules:/var/www/html/modules
- ./profiles:/var/www/html/profiles
- ./themes:/var/www/html/themes
- ./sites:/var/www/html/sites
restart: always
networks:
- drupal-network
postgres:
image: postgres:11
container_name: <CONTAINERNAME>
environment:
POSTGRES_PASSWORD: <PASSWORD>
POSTGRES_DB: drupal
POSTGRES_USER: drupal
restart: always
networks:
- drupal-network
networks:
default:
driver: bridge
drupal-network:
external: true
## EXECUTE THIS COMMAND FIRST: docker run --rm -v /opt/docker/drupal/sites:/temporary/sites drupal cp -aRT /var/www/html/sites /temporary/sites
- Dominant language
- Shell
- Stars
- 291
- Forks
- 199
- Avg merge
- 5h 12m
- Merged PRs (30d)
- 1
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from docker-library/drupal
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
docker-library/drupal#270 · 3 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
docker-library/drupal#264 · 14 comments · 4 reactions ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
docker-library/drupal#263 · 23 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 42/100
docker-library/drupal#246 · 6 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
docker-library/drupal#230 · 3 comments ·
All issues in docker-library/drupal
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
danielmiessler/LifeOS#2218 ·
-
docs(agents): strengthen the no-backslash-escaped-backticks rule with an issue-creation example Open
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
technical-debt
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
ll7/robot_sf_ll7#9560 ·
-
package-update
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
oSoWoSo/vOid_Community_repOsitory#148 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100