Skip to content

Instantly share code, notes, and snippets.

@alanef
Created February 14, 2022 17:51
Show Gist options
  • Select an option

  • Save alanef/917584ca545893108f3bae61e94f91ee to your computer and use it in GitHub Desktop.

Select an option

Save alanef/917584ca545893108f3bae61e94f91ee to your computer and use it in GitHub Desktop.
version: '3.3'
services:
db:
image: mariadb:latest
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: mypass
MYSQL_DATABASE: wp
MYSQL_USER: wordpress
MYSQL_PASSWORD: wordpress
ports:
- "${MYSQL}:3306"
php:
extra_hosts:
- "hosts.docker.internal:host-gateway"
depends_on:
- db
build: ${DOCKER_IMAGES}/${IMG}/
volumes:
- ${PWD}:/var/www/html
ports:
- "${PORT}:${PORT}"
expose:
- "${PORT}"
logging:
driver: journald
restart: always
environment:
PORT: "${PORT}"
dns: 8.8.8.8
phpmyadmin:
depends_on:
- db
image: phpmyadmin/phpmyadmin
environment:
# - PMA_HOST=db
# - PMA_PORT=3306
# - PMA_USER=wordpress
# - PMA_PASSWORD=wordpress
- PMA_ARBITRARY=1
restart: always
ports:
- "${PHPMYADMINPORT}:80"
volumes:
db_data:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment