Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save deltacodepl/33bf722eefe6e3748a9e464c6927fb22 to your computer and use it in GitHub Desktop.

Select an option

Save deltacodepl/33bf722eefe6e3748a9e464c6927fb22 to your computer and use it in GitHub Desktop.

Revisions

  1. @erikyuzwa erikyuzwa revised this gist Mar 22, 2024. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions wordpress-6-2-2-docker-compose.yml
    Original file line number Diff line number Diff line change
    @@ -7,6 +7,8 @@
    #
    # Note: I have had a LOT of issues working with anything newer then Docker Desktop v4.26.1
    # If you're on something newer, then double check against this release.
    #
    # I also have a video going through this here: https://www.youtube.com/watch?v=gEceSAJI_3s

    version: "3.8"

  2. @erikyuzwa erikyuzwa revised this gist Mar 22, 2024. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions wordpress-6-2-2-docker-compose.yml
    Original file line number Diff line number Diff line change
    @@ -5,6 +5,9 @@
    # MYSQL_PASSWORD=<something>
    # MYSQL_ROOT_PASSWORD=<something>
    #
    # Note: I have had a LOT of issues working with anything newer then Docker Desktop v4.26.1
    # If you're on something newer, then double check against this release.

    version: "3.8"

    services:
  3. @erikyuzwa erikyuzwa renamed this gist Nov 15, 2023. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  4. @erikyuzwa erikyuzwa revised this gist Jun 8, 2023. 1 changed file with 1 addition and 2 deletions.
    3 changes: 1 addition & 2 deletions docker-compose.yml
    Original file line number Diff line number Diff line change
    @@ -58,8 +58,7 @@ services:
    WORDPRESS_DB_USER: '${MYSQL_USER}'
    WORDPRESS_DB_PASSWORD: '${MYSQL_PASSWORD}'
    volumes:
    # - ./wp-content:/var/www/html/wp-content
    - ./:/var/www/html/
    - ./wp-content:/var/www/html/wp-content
    networks:
    - wordpress-network

  5. @erikyuzwa erikyuzwa revised this gist Jun 8, 2023. 1 changed file with 5 additions and 2 deletions.
    7 changes: 5 additions & 2 deletions docker-compose.yml
    Original file line number Diff line number Diff line change
    @@ -5,12 +5,11 @@
    # MYSQL_PASSWORD=<something>
    # MYSQL_ROOT_PASSWORD=<something>
    #
    version: "3.x"
    version: "3.8"

    services:

    database:
    mem_limit: 2048m # allocate more memory as needed
    # We use a mariadb image which supports both amd64 & arm64 architecture
    image: mariadb:10.6.4-focal
    restart: unless-stopped
    @@ -26,6 +25,10 @@ services:
    - db-data:/var/lib/mysql
    networks:
    - wordpress-network
    deploy:
    resources:
    limits:
    memory: 2048m

    phpmyadmin:
    depends_on:
  6. @erikyuzwa erikyuzwa created this gist Jun 8, 2023.
    68 changes: 68 additions & 0 deletions docker-compose.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,68 @@
    # create a local .env file with the following 4 properties:
    #
    # MYSQL_DATABASE=<something>
    # MYSQL_USER=<something>
    # MYSQL_PASSWORD=<something>
    # MYSQL_ROOT_PASSWORD=<something>
    #
    version: "3.x"

    services:

    database:
    mem_limit: 2048m # allocate more memory as needed
    # We use a mariadb image which supports both amd64 & arm64 architecture
    image: mariadb:10.6.4-focal
    restart: unless-stopped
    ports:
    - 3306:3306
    env_file: .env
    environment:
    MYSQL_ROOT_PASSWORD: '${MYSQL_ROOT_PASSWORD}'
    MYSQL_DATABASE: '${MYSQL_DATABASE}'
    MYSQL_USER: '${MYSQL_USER}'
    MYSQL_PASSWORD: '${MYSQL_PASSWORD}'
    volumes:
    - db-data:/var/lib/mysql
    networks:
    - wordpress-network

    phpmyadmin:
    depends_on:
    - database
    image: phpmyadmin/phpmyadmin
    restart: unless-stopped
    ports:
    - 8081:80
    env_file: .env
    environment:
    PMA_HOST: database
    MYSQL_ROOT_PASSWORD: '${MYSQL_ROOT_PASSWORD}'
    networks:
    - wordpress-network

    wordpress:
    depends_on:
    - database
    image: wordpress:6.2.2-apache
    restart: unless-stopped
    ports:
    - 8080:80
    env_file: .env
    environment:
    WORDPRESS_DB_HOST: database:3306 # use the same name as database service
    WORDPRESS_DB_NAME: '${MYSQL_DATABASE}'
    WORDPRESS_DB_USER: '${MYSQL_USER}'
    WORDPRESS_DB_PASSWORD: '${MYSQL_PASSWORD}'
    volumes:
    # - ./wp-content:/var/www/html/wp-content
    - ./:/var/www/html/
    networks:
    - wordpress-network

    volumes:
    db-data:

    networks:
    wordpress-network:
    driver: bridge