Wordpress Hosted on a Raspberry Pi
HTML-код
- Опубликовано: 11 сен 2024
- This is a quick video showing you Wordpress Hosted on a Raspberry Pi using docker. We'll create a quick script to install docker. Then install a container for Wordpress, MariaDB, DuckDNS, and finally Portainer for container management.
################################################
###########Docker Install Bash Script##################
#!/usr/bin/env bash
sudo apt-get remove docker docker-engine docker.io containerd runc -y
sudo apt-get update -y
sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common -y
curl -fsSL download.docke... | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] download.docke... $(lsb_release -cs) stable"
sudo apt-get update -y
sudo apt-get install docker-ce docker-ce-cli containerd.io -y
sudo usermod -aG docker pi
################################################
###############Replace Variables####################
DBPASS = database password
PATH = volume path
SD = DuckDNS subdomain
TK = DucKDNS token
################################################
###############Docker Config#######################
docker network create wordpress
docker run -d \
--name wordpress \
--network wordpress\
-e PUID=1000 \
-e PGID=1000 \
-e WORDPRESS_DB_HOST=mariadb\
-e WORDPRESS_DB_PASSWORD=DBPASS\
-p 80:80\
-v PATH/wordpress:/var/www/html \
--restart unless-stopped \
wordpress
docker run -d \
--name mariadb\
--network wordpress\
-e PUID=1000 \
-e PGID=1000 \
-e MYSQL_ROOT_PASSWORD=DBPASS \
-v PATH/mariadb:/etc/mysql/conf.d \
--restart unless-stopped \
mariadb:latest
docker run -d \
--name=duckdns \
--network wordpress\
-e PUID=1000 \
-e PGID=1000 \
-e TZ=america/New_york\
-e SUBDOMAINS=SD\
-e TOKEN=TK\
--restart unless-stopped \
linuxserver/duckdns:latest
docker run -d \
--name=portainer \
-e PUID=1000 \
-e PGID=1000 \
-p 8000:8000 \
-p 9000:9000 \
--restart=always \
-v /var/run/docker.sock:/var/run/docker.sock \
-v portainer_data:/data \
portainer/portainer-ce
################################################
################################################
---------------------------------------------------------------------------------------------------------------
-==Affiliate Link Notice==-
Links below are affiliate links.
If you use one of the these links to make a purchase.
My channel makes a small commission at no cost to you.
Elementor Pro is jam-packed with both basic and advanced design features. You can simply develop great websites using Elementor Pro even if you have no prior design knowledge.
stevestechstuf...
---------------------------------------------------------------------------------------------------------------