Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
npm-wordpress
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
project-templates
web
npm-wordpress
Commits
8a74d1de
Commit
8a74d1de
authored
Mar 07, 2018
by
Vadym Gidulian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added possibility to connect to remote WordPress database
parent
df7d6ba2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
12 deletions
+23
-12
.env
.env
+1
-0
docker-compose.yml
docker-compose.yml
+22
-12
No files found.
.env
View file @
8a74d1de
THEME_NAME=theme
DB_HOST=mysql.dev.gvia.group
DB_NAME=wordpress
DB_USER=wordpress
DB_PASSWORD=wordpress
docker-compose.yml
View file @
8a74d1de
...
...
@@ -10,6 +10,14 @@ services:
-
./.docker/html:/var/www/html
entrypoint
:
>
bash -c "\
{ \
echo \"<?php\"; \
echo \"add_filter('pre_option_home', 'test_localhost');\"; \
echo \"add_filter('pre_option_siteurl', 'test_localhost');\"; \
echo \"function test_localhost() {\"; \
echo \" return 'http://localhost:2999';\"; \
echo \"}\"; \
} > /var/www/html/wp-content/db.php && \
{ \
echo '<IfModule mod_headers.c>'; \
echo 'Header set Access-Control-Allow-Origin "*"'; \
...
...
@@ -18,18 +26,20 @@ services:
a2enmod headers && \
docker-entrypoint.sh apache2-foreground"
environment
:
WORDPRESS_DB_HOST
:
$DB_HOST
# Comment this to use local DB
WORDPRESS_DB_NAME
:
$DB_NAME
WORDPRESS_DB_USER
:
$DB_USER
WORDPRESS_DB_PASSWORD
:
$DB_PASSWORD
links
:
-
mysql
mysql
:
image
:
mysql
volumes
:
-
./.docker/mysql:/var/lib/mysql
environment
:
MYSQL_ALLOW_EMPTY_PASSWORD
:
1
MYSQL_DATABASE
:
$DB_NAME
MYSQL_USER
:
$DB_USER
MYSQL_PASSWORD
:
$DB_PASSWORD
# Uncomment this to use local DB
# links:
# - mysql
#
# mysql:
# image: mysql
# volumes:
# - ./.docker/mysql:/var/lib/mysql
# environment:
# MYSQL_ALLOW_EMPTY_PASSWORD: 1
# MYSQL_DATABASE: $DB_NAME
# MYSQL_USER: $DB_USER
# MYSQL_PASSWORD: $DB_PASSWORD
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment