Added environment variables w/ env file.
This commit is contained in:
+6
-6
@@ -4,7 +4,7 @@ services:
|
||||
wp:
|
||||
image: wordpress:latest # https://hub.docker.com/_/wordpress/
|
||||
ports:
|
||||
- 127.0.0.1:80:80 # change ip if required
|
||||
- ${IP}:80:80 # change ip if required
|
||||
volumes:
|
||||
- ./config/php.conf.uploads.ini:/usr/local/etc/php/conf.d/uploads.ini
|
||||
- ./wp-app:/var/www/html # Full wordpress project
|
||||
@@ -12,9 +12,9 @@ services:
|
||||
#- ./theme-name/trunk/:/var/www/html/wp-content/themes/theme-name # Theme development
|
||||
environment:
|
||||
WORDPRESS_DB_HOST: db
|
||||
WORDPRESS_DB_NAME: wordpress
|
||||
WORDPRESS_DB_NAME: "${DB_NAME}"
|
||||
WORDPRESS_DB_USER: root
|
||||
WORDPRESS_DB_PASSWORD: password
|
||||
WORDPRESS_DB_PASSWORD: "${DB_ROOT_PASSWORD}"
|
||||
depends_on:
|
||||
- db
|
||||
|
||||
@@ -30,7 +30,7 @@ services:
|
||||
db:
|
||||
image: mysql:latest # https://hub.docker.com/_/mysql/ - or mariadb https://hub.docker.com/_/mariadb
|
||||
ports:
|
||||
- 127.0.0.1:3306:3306 # change ip if required
|
||||
- ${IP}:3306:3306 # change ip if required
|
||||
command: [
|
||||
'--default_authentication_plugin=mysql_native_password',
|
||||
'--character-set-server=utf8mb4',
|
||||
@@ -40,8 +40,8 @@ services:
|
||||
- ./wp-data:/docker-entrypoint-initdb.d
|
||||
- db_data:/var/lib/mysql
|
||||
environment:
|
||||
MYSQL_DATABASE: wordpress
|
||||
MYSQL_ROOT_PASSWORD: password
|
||||
MYSQL_DATABASE: "${DB_NAME}"
|
||||
MYSQL_ROOT_PASSWORD: "${DB_ROOT_PASSWORD}"
|
||||
|
||||
volumes:
|
||||
db_data:
|
||||
Reference in New Issue
Block a user