99 lines
4.0 KiB
Markdown
99 lines
4.0 KiB
Markdown
|
|
- [find default nginx index.html file with welcome message](https://stackoverflow.com/a/39335059)
|
|
/usr/sbin/nginx -> binary file
|
|
/usr/lib/nginx -> modules/ empty
|
|
/usr/share/nginx -> `http-default_server.conf` -> error 404
|
|
/run/nginx -> `nginx.pid`
|
|
/var/log/nginx -> logs
|
|
/var/lib/nginx -> folders : html/index.html -> i changed it and it didn't reflect on front
|
|
/etc/logrotate.d/nginx -> file for logrogate
|
|
/etc/nginx -> classic configs files
|
|
|
|
#### debug :
|
|
|
|
- `docker exec -ti <container-name> bash` to run bash inside a running container
|
|
- `docker logs <container_name>` to see the logs on standard output of a container
|
|
- `docker ps` to list the container, and see their names
|
|
- [duplicator](https://duplicator.com/knowledge-base/classic-install/)
|
|
- in installer.php :
|
|
- delete first blank line
|
|
- close last line comment
|
|
1. download .zip and installer.php
|
|
2. put them on the server :
|
|
- in an empty file, accessible with url
|
|
- then go to this file with url, and go to installer.php
|
|
- if doing it in this docker :
|
|
- delete everything inside the wp volume (ex: volumes(wp_volume)
|
|
- then copy the 2 files inside
|
|
- then go to the local url in browser, and reach the installer.php
|
|
ex : https://my-local-site/installer.php
|
|
|
|
|
|
#### todo :
|
|
|
|
- **VOLUMES :** it still not clear the better way to deal with volumes :
|
|
- if i use named bind volumes with :
|
|
```
|
|
services:
|
|
wordpress:
|
|
volumes:
|
|
- wp_plugin:/path/inside/container
|
|
|
|
volumes:
|
|
wp_plugins:
|
|
driver: local
|
|
driver_opts:
|
|
type: none
|
|
o: "bind"
|
|
device: /path/on/local/machine
|
|
```
|
|
- the folder on host has its ownerships changed, because it's recreated by docker
|
|
- so the pbm is that if the plugin folder has no content yet, you need to use sudo to change its owner back to the user
|
|
- instead i can use bind mount like in this answer :
|
|
- https://stackoverflow.com/questions/77949712/docker-compose-ownership-of-named-bind-volume-with-specified-path?noredirect=1#comment137421603_77949712
|
|
```
|
|
- /path/on/local/machine:/path/inside/container
|
|
```
|
|
- but if i do it with mariadb volume, container mariadb cannot work anymore
|
|
- i dont have time to understand why, but certainly it doesn't have the appropriates rights anymore
|
|
- and anyway what is the difference with this :
|
|
- https://docs.docker.com/storage/bind-mounts/
|
|
- https://docs.docker.com/compose/compose-file/compose-file-v3/#volumes
|
|
```
|
|
- type: bind
|
|
source: ./static
|
|
target: /opt/app/static
|
|
```
|
|
- **ERRORS LOG :** it would be better to have a way to see all the error logs from all containers
|
|
maybe with a volume for logs
|
|
- in the meantime, here are the logs :
|
|
- wordpress : /var/www/html/wp-content/
|
|
as precised in the wp-config.php file with DEBUG_LOGS variable,
|
|
that i create in wp_entrypoint.sh
|
|
- mariadb :
|
|
- nginx :
|
|
- **PROJECT NAME :**
|
|
- for the moment we need to modify the project name and url in the model.env file
|
|
- that would be better to do it in the parent directory
|
|
- **LOCAL URL :**
|
|
- adding local url in /etc/hosts don't work
|
|
- makefile don't warn it's not there
|
|
- it should also print the path
|
|
- **SUDO :**
|
|
- some action needs sudo access :
|
|
- writing localhost alias in /etc/hosts
|
|
- erasing volumes
|
|
- So, either :
|
|
- testing if doing everything in sudo works well
|
|
(right access to plugin dir for example)
|
|
- or is it possible to run make as sudo, but inside of make only certain rules are made as sudo ?
|
|
- or is it possible to do everything without sudo ?
|
|
- **MULTIPLE SITES :**
|
|
- for the moment it's not possible to launch a second wordpress container
|
|
since it will use the same containers names
|
|
- so maybe doing something with prefixing names ?
|
|
- **PLUGINS :**
|
|
- when running make again, if the plugin symlink was removed, it is not added
|
|
- it seems that the entrypoints is not running again if not modified
|
|
- if i just change one line in the entrypoint file, it is running and the plugins are linked
|