Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### <mywebsite>.com
- version: '3.1'
- services:
- <mywebsite>-site:
- image: wordpress:5.5.0-php7.4
- #image: wordpress:latest
- container_name: <mywebsite>-site
- restart: unless-stopped
- ports:
- - 80
- environment:
- - WORDPRESS_DB_HOST=<mywebsite>-db
- - WORDPRESS_DB_USER=<DB_USER>
- - WORDPRESS_DB_PASSWORD=<DB_PW>
- - WORDPRESS_DB_NAME=<mywebsite>
- - VIRTUAL_HOST=<mywebsite>.com,www.<mywebsite>.com
- - VIRTUAL_PORT=80
- - LETSENCRYPT_HOST=<mywebsite>.com,www.<mywebsite>.com
- - LETSENCRYPT_EMAIL=<LE_EMAIL>
- - HTTPS_METHOD=noredirect
- depends_on:
- - <mywebsite>-db
- - <mywebsite>-cache
- volumes:
- - /var/www/html/<mywebsite>.com:/var/www/html
- - ./usr/local/etc/php/conf.d:/usr/local/etc/php/conf.d
- - /var/logs/<mywebsite>.com:/var/logs/
- <mywebsite>-db:
- image: mysql:5.7
- container_name: <mywebsite>-db
- restart: unless-stopped
- environment:
- - MYSQL_DATABASE=<mywebsite>
- - MYSQL_USER=<DB_USER>
- - MYSQL_PASSWORD=<DB_PW>
- - MYSQL_ROOT_PASSWORD=biggt92
- volumes:
- - ./<mywebsite>-db/var/lib/mysql:/var/lib/mysql
- <mywebsite>-cache:
- image: redis:latest
- hostname: <mywebsite>-cache
- container_name: <mywebsite>-cache
- command: redis-server /etc/redis/redis.conf
- volumes:
- - /etc/localtime:/etc/localtime:ro
- - ./redis.conf:/etc/redis/redis.conf
- restart: always
- volumes:
- <mywebsite>-db:
- <mywebsite>-site:
- networks:
- default:
- external:
- name: nginx-proxy
Add Comment
Please, Sign In to add comment