Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Wordpress not working with frontend and backend networks. #928

corneliusmixon started this conversation in General
Discussion options

I like to create a backend network for the containers to communicate and I expose the frontend to my LAN with a macvlan. I have accomplished this on a few other compose files without issue. But I'm having an issue with Wordpress. When I test with just one network, everything works. I'm using the bitnami image in this file but I get the same result with this image. Can someone tell me what I'm doing wrong here? https://pastebin.com/J7B89Mz6

Pastebin contents saved for posterity:
services:
 # Define the mariadb service
 mariadb:
 image: docker.io/bitnami/mariadb:11.4
 volumes:
 - wordpress_db:/bitnami/mariadb
 environment:
 - ALLOW_EMPTY_PASSWORD=yes # ALLOW_EMPTY_PASSWORD is recommended only for development. Using an empty password in production can pose security risks, such as unauthorized access to the database.
 - MARIADB_USER=bn_wordpress
 - MARIADB_DATABASE=bitnami_wordpress
 networks:
 - wordpress_backend
 # Define the phpmyadmin service
 phpmyadmin:
 image: docker.io/bitnami/phpmyadmin:5
 ports:
 - 80:8080
 - 443:8443
 depends_on:
 - mariadb
 environment:
 - DATABASE_ALLOW_NO_PASSWORD=false # Disallowing no password for security reasons to prevent unauthorized access.
 - PHPMYADMIN_ALLOW_ARBITRARY_SERVER=yes
 networks:
 custommacvlan:
 ipv4_address: 192.168.100.201
 wordpress_backend:
 # Define the wordpress service
 wordpress:
 image: docker.io/bitnami/wordpress:latest
 ports:
 - 80:8080
 - 443:8443
 volumes:
 - wordpress_data:/bitnami/wordpress
 depends_on:
 - mariadb
 environment:
 - ALLOW_EMPTY_PASSWORD=yes # ALLOW_EMPTY_PASSWORD is recommended only for development. Using an empty password in production can pose security risks, such as unauthorized access to the database.
 - WORDPRESS_DATABASE_HOST=mariadb
 - WORDPRESS_DATABASE_PORT_NUMBER=3306
 - WORDPRESS_DATABASE_USER=bn_wordpress
 - WORDPRESS_DATABASE_NAME=bitnami_wordpress
 networks:
 custommacvlan:
 ipv4_address: 192.168.100.200
 wordpress_backend:
# Define the volumes
volumes:
 wordpress_data:
 driver: local
 name: wordpress_data
 wordpress_db:
 driver: local
 name: wordpress_db
# Define the networks
networks:
 custommacvlan:
 external: true
 wordpress_backend:
 name: wordpress_backend
You must be logged in to vote

Replies: 1 comment

Comment options

What behavior do you get?

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /