- docker-compose down && ./clean.sh
- create docker-compose.override.yml to change some enviroment values
docker-compose run --rm setup
If you modified the Dockerfile, you need to rebuild the images
docker-compose build --force-rm --no-cache setup
docker-compose up -d app
If you need to modify app container, there are two methods:
- You just attach to the container and modify the enviroment
docker exec -it dockeropencart_app_1 bash
- Modify outside and restart the container. If you modified the Dockerfile, you need to rebuild the images
docker-compose build --force-rm --no-cache app
Stop and remove the container
docker stop dockeropencart_app_1
docker rm dockeropencart_app_1
Start the modified container again
docker-compose up -d app
You should override "XDEBUG_CONFIG" in docker-compose.override.yml, e.g. set your remote host ip.
For sublime, you should install Xdebug plugin first and then add some configs to your project setting, e.g.
{
"folders":
[
{
"follow_symlinks": true,
"path": "."
}
],
"settings": {
"xdebug": {
"url": "http://localhost/",
"path_mapping": {"/var/www/html/localhost/" : "/home/cong/web-dev/webroot/localhost/"}
}
}
}
Refer to https://github.com/martomo/SublimeTextXdebug for details.
Similar to localhost's setup, but you need to prepare some other files too. For examples, if your domain is xxx.com, what you need to do is
- Define build args and envs "DOMAIN_NAME: xxx.com" in docker-compose.override.yml, see docker-compose.override.yml.dist for detais.
- Create your xxx.com.conf or xxx.com.https.conf and add it to apache-php/conf directory.
- For https website, you should put your ssl certs in apache-php/certs/xxx.com directoty.
How to issue a cert ? Refer to https://github.com/Neilpang/acme.sh.
Same as localhost's.
Run setup_acme.sh in app container.
setup_acme.sh apache-php/certs/xxx.com
This step is used to install acme tool and cron job. It will re-issue certs for us. Remeber to backup certs before destorying the docker container!!!