Created
December 31, 2023 17:23
-
-
Save dejurin/0815aef76ba603b8279b7ff6236f9970 to your computer and use it in GitHub Desktop.
docker-compose.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.1" | |
services: | |
web: | |
image: wordpress:6.4-php8.1-apache | |
restart: always | |
volumes: | |
- ./wordpress:/var/www/html | |
- ./custom.ini:/usr/local/etc/php/conf.d/custom.ini | |
env_file: | |
- ./secret/dev.env | |
ports: | |
- "80:80" | |
- "443:443" | |
depends_on: | |
- db | |
networks: | |
- default | |
db: | |
image: mariadb | |
restart: always | |
volumes: | |
- ./data:/var/lib/mysql | |
env_file: | |
- ./secret/dev.env | |
ports: | |
- "8890:3306" | |
networks: | |
- default | |
networks: | |
default: | |
driver: bridge |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
dev.env
-----------------------------------------------
D O C K E R R U N - T I M E S E T T I N G S
-----------------------------------------------
The following settings are applied during
$ docker-compose up
-----------------------------------------------
WORDPRESS_DB_HOST=db:3306
WORDPRESS_DB_USER=devs
WORDPRESS_DB_PASSWORD=devs123!
WORDPRESS_DB_NAME=wp
MYSQL_ROOT_PASSWORD=root123!
MYSQL_USER=devs
MYSQL_PASSWORD=devs123!
MYSQL_DATABASE=wp