# Wordpress with MariaDB # version: '3' services: # https://hub.docker.com/_/wordpress # https://github.com/docker-library/docs/tree/master/wordpress wordpress: image: wordpress:latest restart: unless-stopped # Take a look the possible public port collision. ports: - 8201:80 links: - database volumes: # Needs R/W UID:GID 33:33 (www-data:www-data). - ./storage/volumes/wordpress_html:/var/www/html environment: # These variables matter only for a new instance. # In the case of migration take care the wp-config.php. WORDPRESS_DB_HOST: database WORDPRESS_DB_NAME: wordpress WORDPRESS_DB_USER: wordpress WORDPRESS_DB_PASSWORD: secret-1 # https://api.wordpress.org/secret-key/1.1/salt/ or # https://passwordsgenerator.net/ WORDPRESS_AUTH_KEY: fill_in WORDPRESS_SECURE_AUTH_KEY: fill_in WORDPRESS_LOGGED_IN_KEY: fill_in WORDPRESS_NONCE_KEY: fill_in WORDPRESS_AUTH_SALT: fill_in WORDPRESS_SECURE_AUTH_SALT: fill_in WORDPRESS_LOGGED_IN_SALT: fill_in WORDPRESS_NONCE_SALT: fill_in extra_hosts: - "host.docker.internal:host-gateway" labels: com.centurylinklabs.watchtower.enable: true # https://hub.docker.com/_/mariadb database: image: mariadb:lts restart: unless-stopped # ports: # - 3306:3306 volumes: # Needs R/W UID:GID 999:999. - ./storage/volumes/mysql:/var/lib/mysql # Needs read UID 999. - ./storage/volumes/mysql_conf_d:/etc/mysql/conf.d - ./storage/volumes/mysql_init_d:/docker-entrypoint-initdb.d environment: MARIADB_AUTO_UPGRADE: "1" MARIADB_INITDB_SKIP_TZINFO: "1" MYSQL_DATABASE: wordpress MYSQL_USER: wordpress # https://passwordsgenerator.net/ MYSQL_PASSWORD: secret-1 MYSQL_ROOT_PASSWORD: secret-2 extra_hosts: - "host.docker.internal:host-gateway" labels: com.centurylinklabs.watchtower.enable: true