Cannot access index.php
borovez opened this issue · 1 comments
borovez commented
Hi,
I am new to docker, but I have successfully setup this container and I see the following page when I visit localhost:8080
I cannot figure out how to redirect this page to my index.php...
I have a docker-compose.yml file in my laravel project like so:
# ./docker-compose.yml
version: '3'
services:
app:
image: adhocore/lemp:7.4
# For different app you can use different names. (eg: )
container_name: testapp
volumes:
- db_data:/var/lib/mysql
# Here you can also volume php ini settings
# - /path/to/zz-overrides:/usr/local/etc/php/conf.d/zz-overrides.ini
ports:
- 8080:80
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: testapp
MYSQL_USER: admin
MYSQL_PASSWORD: password
# for postgres you can pass in similar env as for mysql but with PGSQL_ prefix
volumes:
db_data: {}
adhocore commented
in volumes section, add one more entry- something like
volumes:
- /path/to/your/laravel:/var/www/html
path to your laravel can be relative. if you have docker-compose.yml in root folder of laravel project itself then - .:/var/www/html
must work