You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
616 B

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# docker-compose.yml
version: '3'
services:
wordpress:
image: wordpress
container_name: wp_xg
ports:
- "18991:80"
environment:
WORDPRESS_DB_HOST: rm-2ze61mfm31936gqjtio.mysql.rds.aliyuncs.com # 因为 docker-compose 会自动把 mysql 的名字用做网络标识,所以在连接数据库的时候该字段就不需要手动指定 IP 地址了直接用“service”的名字 mysql 就行了。
WORDPRESS_DB_USER: wp_xg
WORDPRESS_DB_PASSWORD: gBb6ebEFqVQUJ6ee
WORDPRESS_DB_NAME: wp_xg
TZ: Asia/Shanghai
restart: unless-stopped