Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- version: '3.7'
- services:
- db:
- image: mysql:8.0.23
- container_name: db
- restart: unless-stopped
- env_file: .env
- environment:
- - MYSQL_DATABASE=hybridized
- volumes:
- - "${PWD}/dbdata:/var/lib/mysql"
- command: '--default-authentication-plugin=mysql_native_password'
- networks:
- - app-network
- wordpress:
- depends_on:
- - db
- image: wordpress:5.6.0-fpm-alpine
- container_name: wordpress
- restart: unless-stopped
- env_file: .env
- environment:
- - WORDPRESS_DB_HOST=db:3306
- - WORDPRESS_DB_USER=$MYSQL_USER
- - WORDPRESS_DB_PASSWORD=$MYSQL_PASSWORD
- - WORDPRESS_DB_NAME=hybridized
- volumes:
- - "${PWD}/hybridized:/var/www/html"
- - "${PWD}/files/wp-content:/var/www/html/wp-content"
- - "${PWD}/files/uploads.ini:/usr/local/etc/php/conf.d/uploads.ini"
- #command: 'chmod 777 -R www-data /var/www/html'
- #command: 'chown -R www-data:www-data /var/www/html'
- networks:
- - app-network
- webserver:
- depends_on:
- - wordpress
- image: nginx:1.19.6-alpine
- container_name: webserver
- restart: unless-stopped
- ports:
- - "80:80"
- - "443:443"
- volumes:
- - "${PWD}/hybridized:/var/www/html"
- - "${PWD}/nginx-conf:/etc/nginx/conf.d"
- - "certbot-etc:/etc/letsencrypt"
- #command: 'chmod 777 -R www-data /var/www/html'
- #command: 'chown -R www-data:www-data /var/www/html'
- networks:
- - app-network
- certbot:
- depends_on:
- - webserver
- image: certbot/certbot
- container_name: certbot
- volumes:
- - "certbot-etc:/etc/letsencrypt"
- - "${PWD}/hybridized:/var/www/html"
- command: certonly --webroot --webroot-path=/var/www/html --email [email protected] --agree-tos --no-eff-email --force-renewal -d example.com -d www.example.com
- volumes:
- certbot-etc:
- hybridized:
- dbdata:
- networks:
- app-network:
- driver: bridge
Advertisement
Add Comment
Please, Sign In to add comment