Compare commits
4 Commits
3ec1fa1a07
...
b6fe0d77fd
Author | SHA1 | Date | |
---|---|---|---|
b6fe0d77fd | |||
2e912bc4ab | |||
|
6d966d388f | ||
|
da8e2fcb9c |
@ -16,7 +16,7 @@ __You can then run a development version of the server by running the following
|
||||
mkdir -p local-development/domain.tld
|
||||
cd local-development/domain.tld
|
||||
mkdir {web,db}
|
||||
docker run -it -p 80:80 -p 443:443 -e PHPVER=81 -e environment=DEV --mount type=bind,source="$(pwd)"/web,target=/home/myuser/public_html --mount type=bind,source="$(pwd)"/db,target=/var/lib/mysql -e uid=30001 -e user=myuser -e domain=domain.tld -e serveralias=www.domain.tld --name local-dev cac:latest
|
||||
docker run -it -p 80:80 -p 443:443 -e PHPVER=81 -e environment=DEV --mount type=bind,source="$(pwd)"/web,target=/home/myuser/public_html --mount type=bind,source="$(pwd)"/db,target=/var/lib/mysql -e uid=30001 -e user=myuser -e domain=domain.tld -e serveralias=www.domain.tld --name local-dev public.ecr.aws/s1f6k4w4/cac:latest
|
||||
```
|
||||
|
||||
*This will start the processes needed to run sites locally.*
|
||||
|
@ -57,7 +57,10 @@ chmod +x $root_path/instance_*
|
||||
echo "Waiting 120 seconds for setup to finish"
|
||||
sleep 120;
|
||||
echo "Installing WordPress..."
|
||||
docker exec $name bash -c "cd /home/$(whoami)/public_html; wp core download; chown -R $(whoami) /home/$(whoami)/public_html"
|
||||
wpdbuser=$(docker exec $name cat /var/lib/mysql/creds |grep User| awk -F ": " {'print $2'})
|
||||
wpdbpass=$(docker exec $name cat /var/lib/mysql/creds |grep Password| awk -F ": " {'print $2'})
|
||||
wpdb=$(docker exec $name cat /var/lib/mysql/creds |grep Database| awk -F ": " {'print $2'})
|
||||
docker exec $name bash -c "cd /home/$(whoami)/public_html; wp core download; wp config create --dbname=$wpdb --dbuser=$wpdbuser --dbpass=$wpdbpass ; chown -R $(whoami):$(whoami) /home/$(whoami)/public_html;"
|
||||
echo "Local Development Instance Created, to stop run ./instance_stop from within the base directory"
|
||||
echo "MySQL DB Credentials"
|
||||
docker exec $name cat /var/lib/mysql/creds
|
||||
|
Loading…
Reference in New Issue
Block a user