- Introduction
- Project structure
- Clone the repository
- Set up the project
- Hosts configuration
- Docker + WordPress
A simple Docker setup for WordPress!
This project has been developed on a Linux system. To learn more about the system, visit the Dotfiles repository.
/
├── docs/
│ └── *.md
├── nginx/
│ ├── conf.d/
│ │ └── default.config
│ └── Dockerfile
├── wordpress/
│ ├── .../
│ │ └── ...
│ └── index.html
├── CONTRIBUTING
├── LICENSE
├── .dockerignore
├── .env
└── docker-compose.yaml
Open a terminal in the directory where you store your repositories and clone it with the following command:
# HTTPS
git clone https://github.com/FJrodafo/META.git
cd META/# SSH
git clone git@github.com:FJrodafo/META.git
cd META/Copy .env.example to .env and fill the credentials:
cp .env.example .env
nano .envA custom local domain is required to access WordPress.
sudo nano /etc/hostsAdd the following lines to your /etc/hosts file:
127.0.0.1 wp.metachannelcorp.com wp.metachannelcorporation.com
127.0.0.1 wp.metachannelcorp.ie wp.metachannelcorporation.ie
You can find a Docker image of this project ready to be pulled on GitHub Packages or Docker Hub official website!
Pull the latest image with the following commands:
# GitHub Packages
docker pull ghcr.io/fjrodafo/meta-wp-nginx:latest# Docker Hub
docker pull fjrodafo/meta-wp-nginx:latestMake sure you have created and configured the .env file correctly before continuing.
Build the container:
docker compose buildNote
If you want to build the image locally, uncomment the build section in docker-compose.yaml and run docker compose build. Otherwise, skip directly to the next step.
Run the container:
docker compose up -dStop the Container:
docker compose downdocker build \
-t ghcr.io/fjrodafo/meta-wp-nginx:1 \
-t ghcr.io/fjrodafo/meta-wp-nginx:1.0 \
-t ghcr.io/fjrodafo/meta-wp-nginx:1.0.0 \
-t ghcr.io/fjrodafo/meta-wp-nginx:latest \
-t fjrodafo/meta-wp-nginx:1.0.0 \
-t fjrodafo/meta-wp-nginx:latest \
./nginx
docker push ghcr.io/fjrodafo/meta-wp-nginx:1
docker push ghcr.io/fjrodafo/meta-wp-nginx:1.0
docker push ghcr.io/fjrodafo/meta-wp-nginx:1.0.0
docker push ghcr.io/fjrodafo/meta-wp-nginx:latest
docker push fjrodafo/meta-wp-nginx:1.0.0
docker push fjrodafo/meta-wp-nginx:latest