Created
May 3, 2022 06:55
-
-
Save ogawa0071/dfca97eb3eb06bc6836632a400968168 to your computer and use it in GitHub Desktop.
Docker Compose - WordPress with PlanetScale
This file contains hidden or 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
| services: | |
| wordpress: | |
| image: wordpress | |
| restart: always | |
| ports: | |
| - 8080:80 | |
| environment: | |
| WORDPRESS_DB_HOST: db | |
| WORDPRESS_DB_USER: exampleuser | |
| WORDPRESS_DB_PASSWORD: examplepass | |
| WORDPRESS_DB_NAME: exampledb | |
| WORDPRESS_CONFIG_EXTRA: define( 'MYSQL_CLIENT_FLAGS', MYSQLI_CLIENT_SSL ); | |
| volumes: | |
| - wordpress:/var/www/html | |
| # db: | |
| # image: mariadb | |
| # restart: always | |
| # environment: | |
| # MYSQL_DATABASE: exampledb | |
| # MYSQL_USER: exampleuser | |
| # MYSQL_PASSWORD: examplepass | |
| # MYSQL_RANDOM_ROOT_PASSWORD: "1" | |
| # volumes: | |
| # - db:/var/lib/mysql | |
| volumes: | |
| wordpress: | |
| # db: |
Author
@abhagsain
This file is for PlanetScale Database. And of course you need to rewrite the environment.
A special setting for PlanetScale is WORDPRESS_CONFIG_EXTRA.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@ogawa0071 Can you share why does this work? Not working for me though