Skip to content

Commit 2102da9

Browse files
committed
Add back the network and IP address in port forwarding
1 parent a236599 commit 2102da9

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

docker-compose.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ services:
33
wordpress:
44
image: wordpress:latest # https://hub.docker.com/_/wordpress/
55
ports:
6-
- 80:80 # change ip if required
6+
- 127.0.0.01:80:80 # change ip if required
77
volumes:
88
- ./wp-app:/var/www/html # Full wordpress project
99
#- ./plugin-name/trunk/:/var/www/html/wp-content/plugins/plugin-name # Plugin development
@@ -15,12 +15,19 @@ services:
1515
WORDPRESS_DB_PASSWORD: password
1616
depends_on:
1717
- db
18+
networks:
19+
- wordpress-network
1820
db:
1921
image: mysql:latest # https://hub.docker.com/_/mysql/ - or mariadb https://hub.docker.com/_/mariadb
2022
ports:
21-
- 3306:3306 # change ip if required
23+
- 127.0.0.1:3306:3306 # change ip if required
2224
volumes:
2325
- ./wp-data:/docker-entrypoint-initdb.d
2426
environment:
2527
MYSQL_DATABASE: wordpress
2628
MYSQL_ROOT_PASSWORD: password
29+
networks:
30+
- wordpress-network
31+
networks:
32+
wordpress-network:
33+
driver: bridge

0 commit comments

Comments
 (0)