Last active
February 12, 2023 11:07
-
-
Save LupusMichaelis/dae7391c5a32ffb73ea1b834f84876f2 to your computer and use it in GitHub Desktop.
Launch official Wordpress image served by Apache accompagnied its by a MySQL Server
This file contains 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
# Launch official Wordpress image served by Apache accompagnied its by a MySQL Server | |
# | |
# Save this file and launch service like this: | |
# docker compose -p wp6-php8-my8 -f wp6-php8-my8.docker-compose.yaml up -d | |
# | |
# XXX NOT SUITABLE FOR PRODUCTION XXX | |
x-config: | |
db-user: &db-user a-secret-user | |
db-password: &db-password a-super-duper-password | |
db-name: &db-name the-name-of-the-game | |
db-table-prefix: &db-table-prefix some_prefix_ | |
services: | |
my: | |
image: mysql:8.0.32-oracle | |
environment: | |
MYSQL_USER: *db-user | |
MYSQL_PASSWORD: *db-password | |
MYSQL_DATABASE: *db-name | |
MYSQL_ALLOW_EMPTY_PASSWORD: MYSQL_ALLOW_EMPTY_PASSWORD | |
healthcheck: | |
test: [ "CMD-SHELL", "mysqladmin ping" ] | |
interval: 30s | |
timeout: 2s | |
retries: 3 | |
volumes: | |
- my:/var/lib/mysql:rw | |
wp: | |
image: wordpress:6.1.1-php8.0 | |
environment: | |
WORDPRESS_DB_HOST: my | |
WORDPRESS_DB_USER: *db-user | |
WORDPRESS_DB_PASSWORD: *db-password | |
WORDPRESS_DB_NAME: *db-name | |
WORDPRESS_TABLE_PREFIX: *db-table-prefix | |
depends_on: | |
my: | |
condition: service_healthy | |
volumes: | |
- www:/var/www/html:rw | |
volumes: | |
my: | |
www: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment