Skip to content

Commit

Permalink
Merge pull request #4 from admturner/code-quality/structure
Browse files Browse the repository at this point in the history
Code quality/structure
  • Loading branch information
admturner authored Jul 29, 2020
2 parents 2ad2373 + b8d3cd7 commit 27214c2
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
.env

# Ignore the built config files.
config/wordpress/Dockerfile
config/containers/Dockerfile

# Don't share individual sites files.
/wordpress/*
Expand Down
8 changes: 4 additions & 4 deletions .env-example → config/.env-example
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
# 2. Replace the sample credentials with your own.

# The name of the database for WordPress
MYSQL_DATABASE=database_name_here
MYSQL_DATABASE=

# MySQL database username
MYSQL_USER=username_here
MYSQL_USER=

# MySQL database password
MYSQL_PASSWORD=mysql_password_here
MYSQL_PASSWORD=

# MySQL root password
MYSQL_ROOT_PASSWORD=mysql_root_password_here
MYSQL_ROOT_PASSWORD=
File renamed without changes.
9 changes: 9 additions & 0 deletions config/php/php.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
error_reporting = E_ALL
display_startup_errors = On
display_errors = On

upload_max_filesize = 100M
post_max_size = 100M

max_execution_time = 3600
request_terminate_timeout = 3600
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ services:
container_name: wordpress
depends_on:
- db
build: "./config/wordpress"
build: "./config/containers"
ports:
- "8000:80"
restart: always
Expand All @@ -33,7 +33,7 @@ services:
- "./wordpress:/var/www/html/"
- "./plugins:/var/www/html/wp-content/plugins"
- "./themes:/var/www/html/wp-content/themes"
- "./uploads.ini:/usr/local/etc/php/conf.d/uploads.ini"
- "./config/php/php.ini:/usr/local/etc/php/conf.d/custom.ini"

volumes:
db_data: {}
12 changes: 8 additions & 4 deletions start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@
USER_ID=`id -u`
GROUP_ID=`id -g`

if [ ! -f './config/wordpress/Dockerfile' ]; then
cp './config/wordpress/Dockerfile.template' './config/wordpress/Dockerfile'
sed -i '' -e "s/\$UID/${USER_ID}/g" './config/wordpress/Dockerfile'
sed -i '' -e "s/\$GID/${GROUP_ID}/g" './config/wordpress/Dockerfile'
if [ ! -f './config/containers/Dockerfile' ]; then
cp './config/containers/Dockerfile.template' './config/containers/Dockerfile'
sed -i '' -e "s/\$UID/${USER_ID}/g" './config/containers/Dockerfile'
sed -i '' -e "s/\$GID/${GROUP_ID}/g" './config/containers/Dockerfile'
fi

if [ ! -f './.env' ]; then
cp './config/.env-example' './.env'
fi

docker-compose up --detach
Expand Down
5 changes: 0 additions & 5 deletions uploads.ini

This file was deleted.

0 comments on commit 27214c2

Please sign in to comment.