Skip to content

Instantly share code, notes, and snippets.

@dejurin
Created December 31, 2023 17:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dejurin/0815aef76ba603b8279b7ff6236f9970 to your computer and use it in GitHub Desktop.
Save dejurin/0815aef76ba603b8279b7ff6236f9970 to your computer and use it in GitHub Desktop.
docker-compose.yml
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
@dejurin
Copy link
Author

dejurin commented Dec 31, 2023

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

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