Go to file
Josh Knapp d260794197 adjust php-values 2023-04-11 22:07:35 -07:00
configs First commit 2023-04-11 21:24:39 -07:00
pipeline First commit 2023-04-11 21:24:39 -07:00
scripts adjust php-values 2023-04-11 22:07:35 -07:00
Dockerfile First commit 2023-04-11 21:24:39 -07:00
README.md First commit 2023-04-11 21:24:39 -07:00


Cloud Nginx Container

This is the base container for running PHP based applications. Select the PHP version with the tags

You mush have docker or compatable containerization software running.

You can pull this image locally by running:

docker pull registry.dnspegasus.net/cnc:81

You can then run a development version of the server by running the following commands:

mkdir -p local-development/domain.tld
cd local-development/domain.tld
mkdir web
mkdir db
docker run -it --rm -p 80:80 -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  cnc:81

This will start the processes needed to run sites locally.

If you need to get into the container you can run from another terminal:

docker exec -it local-dev /bin/bash

To install WordPress for your site

cat /var/lib/mysql/creds
su - myuser
cd ~/public_html
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.


74 - PHP 7.4
80 - PHP 8.0
81 - PHP 8.1
82 - PHP 8.2

Environment Variables

Required Tags
uid - User ID for File Permissions
user - Username for File Permissions
domain - Primary Domain for configuration

Optional Tags
environment - Set to DEV to start memcached and mysql locally for development purposes
serveralias - Set to allow alternative hostnames for a site.