This creates a three docker container which are connected by a custom bridge network and two volumes, one for storing mysql data and another for storing wordpress data.
- username: root
- password: password
When running phpmyadmin under reverse proxy then it automatically works
Wordpress running under reverse proxy requires changing the url
- Change the
WORDPRESS_HOME
&WORDPRESS_URL
with the reverse proxy url then build
- docker-compose build
- docker-compose up -d
- docker-compose down
- docker volume ls
- docker volume rm
- docker images
- docker rmi
- docker exec -it /bin/bash
- docker ps
- docker ps -a
- docker rm <container_id>
- docker network ls
-e "s!localhost!blog.example.com!g" -e "s!#(\s*ServerName\s+)www.example.com!\1blog.example.com!g"
COPY ./blog.example.com.conf /etc/apache2/sites-available RUN a2ensite blog.example.com.conf
COPY ./.htaccess /usr/src/wordpress/.htaccess
Custom Permalink /index.php/%year%/%monthnum%/%day%/%postname%/