Valist
Search…
Setup: Wordpress
This example demonstrates how to set up a test environment for a Wordpress website with a custom theme. This can be very useful to test a theme in a staging environment and sharing it with other people.

valist.yml

1
services:
2
db:
3
image: mysql:5.7
4
environment:
5
- MYSQL_ROOT_PASSWORD=somewordpress
6
- MYSQL_DATABASE=wordpress
7
- MYSQL_USER=wordpress
8
- MYSQL_PASSWORD=wordpress
9
wordpress:
10
dockerfile: Dockerfile
11
public: true
12
port: 80
13
environment:
14
- WORDPRESS_DB_HOST=db:3306
15
- WORDPRESS_DB_USER=wordpress
16
- WORDPRESS_DB_PASSWORD=wordpress
17
- WORDPRESS_DB_NAME=wordpress
18
depends_on:
19
- db
Copied!

Dockerfile

This uses a custom Dockerfile which is using the default Wordpress image but also copies over a custom theme to the folder holding the themes in Wordpress.
1
FROM wordpress:latest
2
COPY theme /var/www/html/wp-content/themes/customtheme
Copied!
Last modified 1yr ago
Copy link