Folders nginx-conf, wp-conf contains the config files of the respective containers.
Folder php and file Dockerfile - file for our php image
.env : file contains variables for docker-compose file
Jenkinsfile, Jenkinsfile_config : files for our pipeline jobs in Jenkins
install.sh - download latest version of wordpress and unarchive to docker volume
db:
image: mysql:${MYSQL_VERSION:-latest}
container_name: db
restart: always
env_file: .env
volumes:
- dbdata:/var/lib/mysql
command: '--default-authentication-plugin=mysql_native_password'
networks:
- wp_network
Service PHP-FPM is an implementation of Fast-CGI for PHP with improved capabilities around process management, logging, and high traffic situations:
php-fpm:
build:
context: ./php
dockerfile: Dockerfile
args:
- PHP_VERSION=${PHP_VERSION:-php:7.4-fpm}
container_name: php-fpm
volumes:
- ${wp_volume}:/var/www/html
depends_on:
- db
networks:
- wp_network
restart: always
nginx:
depends_on:
- php-fpm
image: nginx:${NGINX_VERSION:-latest}
container_name: nginx
restart: always
ports:
- "8082:80"
volumes:
- ${wp_volume}:/var/www/html
- ./nginx-conf/nginx.conf:/etc/nginx/conf.d/default.conf
networks:
- wp_network
links:
- php-fpm