- Install docker on your testing server
- Clone repository
- Create .env file (see sample)
- Build containers with docker compose.
docker-compose up --build
- My docker file is based on the official WordPress docker container
- Uses Composer for configuration
- Using MariaDB for local development
- Docker installed
- Already configured in devcontainer
- Add ssh keys to allow git access
eval "$(ssh-agent -s)"
ssh-add ~/ssh/github_catenare- Steps
- Start the dev container
- F1 remote-container: Reopen container - Will restart with a devcontainer configuration
- Add local .env variables to container environment.
set -a; source .env; set +a
- Run composer install.
composer install
- Run php built-in server. `php -S 0.0.0.0:8080 -t wordpress/
- Open your browser to http://localhost:8000
- Custom build php does not make it easy to run unit
git clone https://github.com/nginx/unit
cd unit
git checkout 1.26.1
cd pkg/docker/
# make build-php7.4 VERSION_php=7.4
make dockerfiles VERSION_php=7.4export UNIT=$( \
docker run -d --mount type=bind,src="$(pwd)/site",dst=/www \
-p 8080:8000 unit:1.27.0-php7.4 \
)
docker exec -ti $UNIT curl -X PUT --data-binary @/www/config.json \
--unix-socket /var/run/control.unit.sock \
http://localhost/config-
PHP
- Using Microsoft PHP containers for devcontainer setup.
- PHP Built-in Server
php -S localhost:8000 -t wordpress/
- PHP Built-in Server
- Using Microsoft PHP containers for devcontainer setup.
-
Nginx Unit
-
Install Docker on Ubuntu
- https://docs.docker.com/engine/install/ubuntu/
- https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user
- Composer file
- php
- Wordpress
- MariaDB
- Install nginx unit - https://unit.nginx.org
- https://www.nginx.com/blog/automating-installation-wordpress-with-nginx-unit-on-ubuntu/
- https://nucker.me/how-to-host-a-wordpress-site-in-docker-with-nginx/
- https://appwrk.com/how-to-set-up-dockerizing-wordpress-with-nginx-web-server
- Unit Wordpress - https://github.com/tippexs/unitwp
- https://www.dmuth.org/wordpress-5-in-docker-with-nginx-and-letsencrypt/
- https://medium.com/swlh/wordpress-deployment-with-nginx-php-fpm-and-mariadb-using-docker-compose-55f59e5c1a
- https://www.digitalocean.com/community/tutorials/how-to-install-wordpress-with-docker-compose
- docker/login-action:
- docker/build-push-action
docker run --rm -it -p 8000:8000/tcp nziswano:wordpress bash
- Need to push generated image to AWS registry
This is a project to automate the deployment of WordPress as a service into AWS.
- TODO: Put diagram of overall system architecture
The cdk.json file tells the CDK Toolkit how to execute your app.
npm run buildcompile typescript to jsnpm run watchwatch for changes and compilenpm run testperform the jest unit testscdk deploydeploy this stack to your default AWS account/regioncdk diffcompare deployed stack with current statecdk synthemits the synthesized CloudFormation template
- Container registry via CDK
- Created the
aws-ecr-repostack - Added test to test against generated cloudformation