Last active
September 7, 2022 21:09
-
-
Save soup-bowl/f3880a446ea27f2088b4243d3e8f2c65 to your computer and use it in GitHub Desktop.
Docker-compose LAMP dev stack
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
version: '3.6' | |
services: | |
db: | |
image: mysql:latest | |
command: --default-authentication-plugin=mysql_native_password | |
environment: | |
MYSQL_ROOT_PASSWORD: e9w86036f78sd9 | |
volumes: | |
- "./database:/var/lib/mysql" | |
db_pma: | |
image: phpmyadmin/phpmyadmin:latest | |
depends_on: | |
- db | |
ports: | |
- 8082:80 | |
environment: | |
MYSQL_ROOT_PASSWORD: e9w86036f78sd9 | |
PMA_USER: root | |
PMA_PASSWORD: e9w86036f78sd9 | |
mail: | |
image: mailhog/mailhog:latest | |
ports: | |
- 8081:8025 | |
www: | |
depends_on: | |
- db | |
image: php:apache | |
volumes: | |
- "./www:/var/www/html" | |
ports: | |
- 8080:80 |
Common cause is the www directory is empty. When you run this script first time (docker-compose up
) it creates a db and www directory. You need to put the PHP script(s) in the www directory, then it will be accessible on the Apache instance (8080).
More complex causes will be permissions-related, which can unfortunately vary per operating system and CMS setups.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
"You don't have permission to access this resource." on port 8080, what can i do? Thank you