Skip to content

Instantly share code, notes, and snippets.

@orpheousff8
Last active May 1, 2021 15:05
Show Gist options
  • Save orpheousff8/d867016884faa602d459af5837d01dc3 to your computer and use it in GitHub Desktop.
Save orpheousff8/d867016884faa602d459af5837d01dc3 to your computer and use it in GitHub Desktop.
Wordpress Nginx
version: '3.1'
services:
nginx:
container_name: NGIX_CONTAINER_NAME
image: nginx:1.18.0-alpine
restart: always
volumes:
- ./config/nginx/vhost.conf:/etc/nginx/conf.d/default.conf
- ./log/nginx:/var/log/nginx
- ./cache/nginx:/var/cache/nginx
- ./wordpress:/var/www/html
ports:
- "80:80"
networks:
- private_network
wordpressFpm:
container_name: WORDPRESS_CONTAINER_FPM_NAME
image: wordpress:5-fpm-alpine
restart: always
volumes:
- ./wordpress:/var/www/html
expose:
- "9000"
networks:
- private_network
environment:
WORDPRESS_DB_HOST: DB_CONTAINER_NAME
WORDPRESS_DB_NAME: DB_NAME
WORDPRESS_DB_USER: DB_USERNAME
WORDPRESS_DB_PASSWORD: DB_PASSWORD
db:
container_name: DB_CONTAINER_NAME
image: mariadb:10.5.9-focal
restart: always
volumes:
- ./db/data:/var/lib/mysql
- ./log/mysql:/var/log/mysql
networks:
- private_network
environment:
MYSQL_ROOT_PASSWORD: DB_ROOT_PASSWORD
MYSQL_DATABASE: DB_NAME
MYSQL_USER: DB_USERNAME
MYSQL_PASSWORD: DB_PASSWORD
networks:
private_network:
driver: bridge
@orpheousff8
Copy link
Author

Wordpress Nginx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment