Wordpress (stack)
Wordpress setup with a MySQL database
linux
Sourced
Repo
Env Vars
WEB_SERVER_PORT=5080MYSQL_DATABASE_USER_NAME=wordpressMYSQL_DATABASE_PASSWORD=''MYSQL_DATABASE_ROOT_PASSWORD=''
Services
wordpress
wordpress:latest
Ports
${WEB_SERVER_PORT}:80
/var/www/html : wordpress
unless-stopped
Env Vars
db:3306=''${MYSQL_DATABASE_USER_NAME}=''${MYSQL_DATABASE_PASSWORD}=''wordpress=''
db
jc21/mariadb-aria:latest
Volumes
/var/lib/mysql : db
unless-stopped
Env Vars
wordpress=''${MYSQL_DATABASE_USER_NAME}=''${MYSQL_DATABASE_PASSWORD}=''${MYSQL_DATABASE_ROOT_PASSWORD}=''
Installation
Via Portainer
- Ensure both Docker and Portainer are installed, and up-to-date
- Log into your Portainer web UI
- Under Settings → App Templates, paste the below URL
- Head to Home → App Templates, and the list of apps will show up
- Select the app you wish to deploy, fill in any config options, and hit Deploy
Template Import URL
https://raw.githubusercontent.com/Lissy93/portainer-templates/main/templates.json
Show Me

Via Docker Run
Service #1 - wordpress
docker run --name wordpress -d \
-e "" \
-e "" \
-e "" \
-e "" \
-p ${WEB_SERVER_PORT}:80 \
-v wordpress:/var/www/html \
--restart=unless-stopped \
wordpress:latest
Service #2 - db
docker run --name db -d \
-e "" \
-e "" \
-e "" \
-e "" \
-v db:/var/lib/mysql \
--restart=unless-stopped \
jc21/mariadb-aria:latest
Via Docker Compose
Save this file as docker-compose.yml and run docker-compose up -d
Use this only as a guide.
- name: wordpress
image: wordpress:latest
ports:
- ${WEB_SERVER_PORT}:80
volumes:
- bind: wordpress
container: /var/www/html
restart_policy: unless-stopped
env:
- name: db:3306
value: ''
- name: ${MYSQL_DATABASE_USER_NAME}
value: ''
- name: ${MYSQL_DATABASE_PASSWORD}
value: ''
- name: wordpress
value: ''
- name: db
image: jc21/mariadb-aria:latest
volumes:
- bind: db
container: /var/lib/mysql
restart_policy: unless-stopped
env:
- name: wordpress
value: ''
- name: ${MYSQL_DATABASE_USER_NAME}
value: ''
- name: ${MYSQL_DATABASE_PASSWORD}
value: ''
- name: ${MYSQL_DATABASE_ROOT_PASSWORD}
value: ''
Alternative Methods
For more installation options, see the Documentation in the GitHub repo
Container Documentation
wordpress Documentation
The WordPress rich content management system can utilize plugins, widgets, and themes.
db Documentation
Extension of the mariadb image that forces aria storage engine by default.