Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # A Simple Docker WordPress
- ## config.env
- ```
- MYSQL_ROOT_PASSWORD=whatever
- WORDPRESS_DB_USER=root
- WORDPRESS_DB_PASSWORD=whatever
- #WORDPRESS_HOST=192.168.1.1
- #WORDPRESS_DB_HOST=192.168.1.1
- ```
- ## docker-compose.yml
- ```
- wordpress:
- image: wordpress
- links:
- - mysql
- ports:
- - 8082:80
- env_file:
- - config.env
- mysql:
- image: mysql
- ports:
- - 3310:3306
- env_file:
- - config.env
- ```
- ## etc/supervisor/conf.d/wordpress.conf
- ```
- [program:wordpress]
- command=docker-compose up
- directory=/home/whatever/wordpress
- redirect_stderr=true
- autostart=true
- autorestart=true
- priority=10
- ```
- ## README.md
- ```
- # Simple Wordpress Container
- ## Auto-restart
- To run automatically:
- - `sudo apt-get install supervisor` # <-- If necessary
- - `sudo cp etc/supervisor/conf.d/wordpress.conf /etc/supervisor/conf.d/wordpress.conf`
- - `sudo supervisorctl reload`
- ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement