This repository has been archived on 2024-02-23. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
digitalstudium 7e63dd222e
2022-09-19 15:10:15 +03:00
LICENSE Initial commit 2022-09-19 15:03:15 +03:00 Update 2022-09-19 15:10:15 +03:00
stack.yml Create stack.yml 2022-09-19 15:04:08 +03:00


Here it is described how to install wordpress via docker

Step 1: Install docker

sudo apt install -y
sudo usermod -aG docker $USER ; newgrp docker
docker swarm init

Step 2: Deploy wordpress stack

docker stack deploy -c stack.yml wp

Step 3: Install nginx and certbot

sudo apt install nginx-light certbot python3-certbot-nginx -y

Step 4: Create nginx config

Create /etc/nginx/conf.d/ file with such content:

server {
  access_log /var/log/nginx/;
  error_log /var/log/nginx/;
  client_max_body_size 0;
  location / {
    proxy_set_header Host $host;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-Proto $scheme;

Step 5: Create ssl cert

sudo certbot --nginx

That's it!