Skip to content

Instantly share code, notes, and snippets.

@bleft
Created February 17, 2022 07:21
Show Gist options
  • Select an option

  • Save bleft/3fbb7ed08983f0338b5d68968da34be5 to your computer and use it in GitHub Desktop.

Select an option

Save bleft/3fbb7ed08983f0338b5d68968da34be5 to your computer and use it in GitHub Desktop.

Revisions

  1. bleft created this gist Feb 17, 2022.
    32 changes: 32 additions & 0 deletions docker-compose.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,32 @@
    version: "3.8"

    services:
    db:
    image: mysql:latest
    volumes:
    - ./db/data:/var/lib/mysql
    ports:
    - "3306:3306"
    restart: always
    environment:
    MYSQL_ROOT_PASSWORD: rootpass
    MYSQL_DATABASE: database
    MYSQL_USER: username
    MYSQL_PASSWORD: password

    wordpress:
    image: wordpress:latest
    depends_on:
    - db
    volumes:
    - ./wp/wp-content:/var/www/html/wp-content
    # Add other files or folders that you want to override here e.g. stylesheets
    ports:
    - "8880:80"
    restart: always
    environment:
    WORDPRESS_DB_HOST: db:3306
    WORDPRESS_DB_NAME: database
    WORDPRESS_DB_USER: username
    WORDPRESS_DB_PASSWORD: password
    WORDPRESS_TABLE_PREFIX: klex