I'm trying to figure out, why my assets like CSS, JS and images are not loading in my theme when running installation on Docker.
Here's my docker-compose.yml
version: "3.3"
services:
db:
image: mysql:8
container_name: blogpn_mysql
restart: always
command: "--default-authentication-plugin=mysql_native_password"
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: wpdb
MYSQL_USER: user
MYSQL_PASSWORD: password
volumes:
- db_data:/var/lib/mysql
networks:
- blogpn_network
wordpress:
image: wordpress:latest
container_name: blogpn_wordpress
restart: always
volumes:
- ./wp-content/themes:/var/www/html/wp-content/themes
- ./uploads.ini:/usr/local/etc/php/conf.d/uploads.ini
environment:
WORDPRESS_DB_HOST: db
WORDPRESS_DB_NAME: wpdb
WORDPRESS_DB_USER: user
WORDPRESS_DB_PASSWORD: password
ports:
- 8211:80
- 443:443
depends_on:
- db
networks:
- blogpn_network
phpmyadmin:
image: phpmyadmin/phpmyadmin
container_name: blogpn_phpmyadmin
restart: always
ports:
- 3333:80
environment:
PMA_HOST: db
MYSQL_ROOT_PASSWORD: password
volumes:
db_data: {}
networks:
blogpn_network: {}
For the files like CSS and JS I'm getting network error 500 (the URL for styles is http://localhost:8211/wp-content/themes/mytheme/style.css
), and for images network error 404.
I'm not sure what I'm missing.