Skip to content

Instantly share code, notes, and snippets.

@orpheousff8
Last active May 1, 2021 13:49
Show Gist options
  • Save orpheousff8/e0149ca595b9e1491114a5e3b49f32ef to your computer and use it in GitHub Desktop.
Save orpheousff8/e0149ca595b9e1491114a5e3b49f32ef to your computer and use it in GitHub Desktop.
Wordpress Apache
version: '3.1'
services:
wordpress:
container_name: WORDPRESS_CONTAINER_NAME
image: wordpress:5.7-apache
restart: always
volumes:
- ./wordpress:/var/www/html
ports:
- "80:80"
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
volumes:
wordpress:
db:
networks:
private_network:
driver: bridge
@orpheousff8
Copy link
Author

Wordpress Apache

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