Update for log rotation and backups

This commit is contained in:
2024-10-14 12:15:11 -07:00
parent ed9ba0118b
commit bbd2de6792
12 changed files with 68 additions and 99 deletions

View File

@@ -15,8 +15,8 @@ __You can then run a development version of the server by running the following
```console
mkdir -p local-development/domain.tld
cd local-development/domain.tld
mkdir {user,db,logs}
docker run -d -it -p 80:80 -p 443:443 -e PHPVER=81 -e environment=DEV --mount type=bind,source="$(pwd)"/user,target=/home/myuser --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 repo.anhonesthost.net/cloud-hosting-platform/cac:latest
mkdir {user,logs}
docker run -d -it -p 80:80 -p 443:443 -e PHPVER=81 -e environment=DEV --mount type=bind,source="$(pwd)"/user,target=/home/myuser -v"$name-mysql":/var/lib/mysql -e uid=30001 -e user=myuser -e domain=domain.tld -e serveralias=www.domain.tld --name local-dev repo.anhonesthost.net/cloud-hosting-platform/cac:latest
```
*This will start the processes needed to run sites locally.*
@@ -40,7 +40,7 @@ wp core download
You should be able to then go into your browser and go to https://localhost (accept the SSL warning if it appears) and follow the prompts to setup the site.
The database credentials are shown in the /var/lib/mysql/creds file, which we had *cat* in the commands above.
The database credentials are shown in the /home/```$user```/mysql_creds file, which we had *cat* in the commands above. They will also be stored in your user directory.
### PHPVER ###
*74* - PHP 7.4
@@ -62,11 +62,11 @@ __Optional Tags__
### Helpful Notes ###
* On your first creation of a dev instance, you will be dumped to the logs output. Hit ```ctrl + c``` to exit the running process.
* A cron is set up in the container to backup the database every 15 minutes to your user's directory.
* If you want to restart the instance again, run ```docker start {name-of-your-container}``` in the example, *name-of-your-cintainer* is *local-dev*
* To stop a restarted instance, run ```docker stop {name-of-your-container}```
* To view log stream from container, run ```docker logs -f {name-of-your-container}```
* To delete a container, run ```docker rm {name-of-your-container}``` *__Note:__ this does not delete the files in public_html or database, as those are store in your system*
* To delete a container, run ```docker rm {name-of-your-container}``` *__Note:__ this does not delete the files in user directory or database, as those are store in your system*
* To view running containers, run ```docker ps```
* To view all created containers, run ```docker ps --all``
* To view all container images downloaded on your system, run ```docker images```