I have created the below docker compose file and used the official WordPress image to transfer my site from shared hosting to docker. Despite using the standard .htaccess file and adding exit; in index.php for testing purposes, the WordPress site remains inaccessible. I've also made the necessary changes in wp-config. I am unable to troubleshoot further, please help
version: '3.1'
services:
wordpress:
container_name: frix_wordpress
build:
context: .
dockerfile: Dockerfile
image: wordpress
restart: always
working_dir: /var/www/html
depends_on:
- db
ports:
- 8099:8082
environment:
WORDPRESS_DB_HOST: db
WORDPRESS_DB_USER: exampleuser
WORDPRESS_DB_PASSWORD: examplepass
WORDPRESS_DB_NAME: exampledb
volumes:
- .:/var/www/html
db:
container_name: frix_db
image: mysql:8.0
restart: always
environment:
MYSQL_DATABASE: exampledb
MYSQL_USER: exampleuser
MYSQL_PASSWORD: examplepass
MYSQL_RANDOM_ROOT_PASSWORD: '1'
volumes:
- db:/var/lib/mysql
volumes:
wordpress:
db: