I am new to Docker and am trying to add phpmyadmin to my docker-compose.yaml file. When I run docker-compose up the pma container is never built. What am I missing?
Here is my Dockerfile
:
networks:
laravel:
services:
app:
build:
context: ./dockerfiles
dockerfile: nginx.dockerfile
args:
- UID=${UID:-1000}
- GID=${GID:-1000}
ports:
- "80:80"
volumes:
- ./src:/var/www/html:delegated
depends_on:
- php
- redis
- mysql
- mailhog
- pma
networks:
- laravel
mysql:
image: mariadb:10.6
volumes:
- ./mysql:/var/lib/mysql
restart: unless-stopped
tty: true
ports:
- "3306:3306"
environment:
MYSQL_DATABASE: homestead
MYSQL_USER: homestead
MYSQL_PASSWORD: secret
MYSQL_ROOT_PASSWORD: secret
SERVICE_TAGS: dev
SERVICE_NAME: mysql
networks:
- laravel
php:
build:
context: ./dockerfiles
dockerfile: php.dockerfile
args:
- UID=${UID:-1000}
- GID=${GID:-1000}
ports:
- "9000:9000"
volumes:
- ./src:/var/www/html:delegated
networks:
- laravel
redis:
image: redis:alpine
restart: unless-stopped
ports:
- "6379:6379"
networks:
- laravel
composer:
build:
context: ./dockerfiles
dockerfile: php.dockerfile
args:
- UID=${UID:-1000}
- GID=${GID:-1000}
volumes:
- ./src:/var/www/html
depends_on:
- php
entrypoint: [ 'composer', '--ignore-platform-reqs' ]
networks:
- laravel
npm:
image: node:current-alpine
volumes:
- ./src:/var/www/html
ports:
- "3000:3000"
- "3001:3001"
- "5173:5173"
working_dir: /var/www/html
entrypoint: [ 'npm' ]
networks:
- laravel
artisan:
build:
context: ./dockerfiles
dockerfile: php.dockerfile
args:
- UID=${UID:-1000}
- GID=${GID:-1000}
volumes:
- ./src:/var/www/html:delegated
depends_on:
- mysql
entrypoint: [ 'php', '/var/www/html/artisan' ]
networks:
- laravel
mailhog:
image: mailhog/mailhog:latest
ports:
- "1025:1025"
- "8025:8025"
networks:
- laravel
pma:
image: phpmyadmin/phpmyadmin:latest
restart: unless-stopped
ports:
- "8081:80"
environment:
PMA_PORT: 3306
PMA_HOST: mysql
PMA_USER: homestead
PMA_PASSWORD: secret
depends_on:
- mysql
networks:
- laravel