Skip to content

Commit 4c54ad4

Browse files
committed
Wordpress now waits for the database and removed redunant network param
1 parent 8c91871 commit 4c54ad4

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

docker-compose.yml

Lines changed: 6 additions & 12 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-
- 127.0.10.10:80:80 # change ip if required
6+
- 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
@@ -13,22 +13,16 @@ services:
1313
WORDPRESS_DB_NAME: wordpress
1414
WORDPRESS_DB_USER: root
1515
WORDPRESS_DB_PASSWORD: password
16-
links:
17-
- db:db
18-
networks:
19-
- wordpress-network
16+
# links:
17+
# - db:db
18+
depends_on:
19+
- db
2020
db:
2121
image: mysql:latest # https://hub.docker.com/_/mysql/ - or mariadb https://hub.docker.com/_/mariadb
2222
ports:
23-
- 127.0.10.10:3306:3306 # change ip if required
23+
- 306:3306 # change ip if required
2424
volumes:
2525
- ./wp-data:/docker-entrypoint-initdb.d
2626
environment:
2727
MYSQL_DATABASE: wordpress
2828
MYSQL_ROOT_PASSWORD: password
29-
networks:
30-
- wordpress-network
31-
32-
networks:
33-
wordpress-network:
34-
driver: bridge

0 commit comments

Comments
 (0)