An example for developing Wordpress sites with Docker and deploy to AWS Elastic Beanstalk
- Bash shell
- Git
- Docker
- Docker Compose plugin
This is what each item is for:
app/
– The WordPress application files are in this directory.bin/
– Useful command-line scripts.data/
– MySQL dump files go here.docker/
– Files required by the Docker setup are in this directory.compose.yml
– Development orchestration config file.Dockerrun.aws.json
- Elastic Beanstalk config file.
$ git clone git@github.com:oanhnn/example-wordpress-with-docker.git project_dir
$ cd project_dir
$ cp .env.example .env
$ mkdir app
$ docker compose up -d
$ bin/backup-db.sh data/dump-20190807-102134.sql
$ bin/restore-db.sh data/dump-20190807-102134.sql
$ bin/change-url.sh http://dev.example.com https://example.com
Follow the steps below to deploy this application to an Elastic Beanstalk Multi-container Docker environment. Accept the default settings unless indicated otherwise in the steps below:
- Download the ZIP file from the Releases section of this repository.
- Login to the Elastic Beanstalk Management Console
- Click Create New Application and give your app a name and description
- Click Create web server and select an IAM instance profile to use.
Note: Please ensure the IAM instance profile you select has the necessary permissions. For more information, see Container Instance Role
- Choose Multi-container Docker in the Predefined configuration dropdown and click Next
- Upload the ZIP file downloaded in step 1
- Review and launch the application
All code contributions must go through a pull request and approved by a core developer before being merged. This is to ensure proper review of all the code.
Fork the project, create a feature branch, and send a pull request.
If you would like to help take a look at the list of issues.
This project is released under the MIT License.
Copyright © 2022 Oanh Nguyen
Please see License File for more information.