Skip to content

Instantly share code, notes, and snippets.

@adamplabarge
Created August 23, 2022 01:34
Show Gist options
  • Save adamplabarge/f40bb66f46bdc75566f9199f47affc63 to your computer and use it in GitHub Desktop.
Save adamplabarge/f40bb66f46bdc75566f9199f47affc63 to your computer and use it in GitHub Desktop.
WordPress, phpMyAdmin, MariaDb, NocoDb
version: '3'
services:
db:
# We use a mariadb image which supports both amd64 & arm64 architecture
image: mariadb
# If you really want to use MySQL, uncomment the following line
#image: mysql:8.0.27
command: '--default-authentication-plugin=mysql_native_password'
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
- MYSQL_ROOT_PASSWORD=somewordpress
- MYSQL_DATABASE=wordpress
- MYSQL_USER=wordpress
- MYSQL_PASSWORD=wordpress
healthcheck:
test: [ "CMD", "mysqladmin" ,"ping", "-h", "localhost" ]
timeout: 20s
retries: 10
expose:
- 3306
- 33060
wordpress:
image: wordpress:latest
ports:
- 80:80
restart: always
environment:
- WORDPRESS_DB_HOST=db
- WORDPRESS_DB_USER=wordpress
- WORDPRESS_DB_PASSWORD=wordpress
- WORDPRESS_DB_NAME=wordpress
- WORDPRESS_DEBUG=true
- WORDPRESS_DEBUG_LOG=true
- WORDPRESS_DEBUG_DISPLAY=false
volumes: ['./:/var/www/html']
links:
- db:mysql
phpmyadmin:
depends_on:
- db
links:
- db:mysql
image: phpmyadmin/phpmyadmin
restart: always
ports:
- '8088:80'
environment:
MYSQL_USERNAME: wordpress
MYSQL_ROOT_PASSWORD: somewordpress
nocodb:
depends_on:
db:
condition: service_healthy
image: nocodb/nocodb:latest
links:
- db:mysql
ports:
- "8888:8080"
restart: always
volumes:
- db_data:/var/lib/mysql
environment:
NC_DB: "mysql2://db:3306?u=root&p=somewordpress&d=wordpress"
volumes:
db_data: {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment