An easy way to upload your wordpress website with Docker, Nginx and Certbot.
This configuration will create automatically a reverse proxy, a sll certification for your domain and a empty wordpress.
-
Install docker.
-
Clone this repository
- Go to the following folder
cd /docker-nginx-certbot/docker- Create the
.envfile from the sample with your values
mv .env.sample .envcd /docker-nginx-certbot/docker/nginx-conf1. default.conf
You have to change :
- Line 5
...
server_name example.com www.example.com;
...2. ssl-default.conf
You have to change :
- Line 5
...
server_name example.com www.example.com;
...- Line 20
...
server_name example.com www.example.com;
...- Line 28 - 29
...
ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
...Note : For staging application, add --staging in docker-nginx-cerbot/docker/script line 18
Launch docker
docker-compose up -dNote : You surely must have the root permissions to start docker.
sudo docker-compose up -dIf docker-compose don't work, try
docker compose up -dPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.