Skip to content

Instantly share code, notes, and snippets.

@diogoko
Last active December 23, 2021 15:27
Show Gist options
  • Select an option

  • Save diogoko/621ceba223a1404de0c6bd12d1ed4f04 to your computer and use it in GitHub Desktop.

Select an option

Save diogoko/621ceba223a1404de0c6bd12d1ed4f04 to your computer and use it in GitHub Desktop.

Revisions

  1. diogoko revised this gist Jul 2, 2021. 2 changed files with 29 additions and 1 deletion.
    18 changes: 18 additions & 0 deletions docker-compose.override.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    version: "3"
    services:
    phpmyadmin:
    image: "phpmyadmin:5"
    ports:
    - "${FORWARD_PHPMYADMIN_PORT:-8888}:80"
    environment:
    PMA_HOST: "mysql"
    PMA_USER: "${DB_USERNAME}"
    PMA_PASSWORD: "${DB_PASSWORD}"
    PMA_ABSOLUTE_URI: "http://localhost:${FORWARD_PHPMYADMIN_PORT:-8888}/"
    volumes:
    - "sailphpmyadmin:/sessions"
    networks:
    - sail
    volumes:
    sailphpmyadmin:
    driver: local
    12 changes: 11 additions & 1 deletion laravel-sail-with-phpmyadmin.md
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,11 @@
    # Quick start

    Download `docker-compose.override.yml` shown below to your project's directory.

    # Slower start

    If you prefer you can edit the existing `docker-compose.yml`.

    Add a new service:

    ```yaml
    @@ -27,4 +35,6 @@ volumes:
    driver: local
    ```
    After running `sail up`, phpMyAdmin will be available at http://localhost:8888/. The port may be changed by setting the `FORWARD_PHPMYADMIN_PORT` environment variable.
    # Usage
    After running `sail up`, phpMyAdmin will be available at http://localhost:8888/. The port may be changed by setting the `FORWARD_PHPMYADMIN_PORT` environment variable.
  2. diogoko renamed this gist Jul 2, 2021. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  3. diogoko created this gist Jul 2, 2021.
    30 changes: 30 additions & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,30 @@
    Add a new service:

    ```yaml
    services:
    ...
    phpmyadmin:
    image: 'phpmyadmin:5'
    ports:
    - '${FORWARD_PHPMYADMIN_PORT:-8888}:80'
    environment:
    PMA_HOST: 'mysql'
    PMA_USER: '${DB_USERNAME}'
    PMA_PASSWORD: '${DB_PASSWORD}'
    PMA_ABSOLUTE_URI: 'http://localhost:${FORWARD_PHPMYADMIN_PORT:-8888}/'
    volumes:
    - 'sailphpmyadmin:/sessions'
    networks:
    - sail
    ```
    Add a new volume to store the session state:
    ```yaml
    volumes:
    ...
    sailphpmyadmin:
    driver: local
    ```
    After running `sail up`, phpMyAdmin will be available at http://localhost:8888/. The port may be changed by setting the `FORWARD_PHPMYADMIN_PORT` environment variable.