Created
December 8, 2020 16:06
-
-
Save dnburgess/948d9c61199392db74742dc1aa99cea2 to your computer and use it in GitHub Desktop.
DB Tech WordPress for Pi Home Server
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2.1' | |
services: | |
wordpress: | |
image: wordpress | |
restart: always | |
ports: | |
- 84:80 | |
environment: | |
WORDPRESS_DB_HOST: db | |
WORDPRESS_DB_USER: exampleuser | |
WORDPRESS_DB_PASSWORD: examplepass | |
WORDPRESS_DB_NAME: exampledb | |
volumes: | |
- /srv/dev-disk-by-label-Files/Config/WordPress:/var/www/html | |
links: | |
- db:db | |
db: | |
image: yobasystems/alpine-mariadb:latest | |
restart: always | |
environment: | |
MYSQL_DATABASE: exampledb | |
MYSQL_USER: exampleuser | |
MYSQL_PASSWORD: examplepass | |
MYSQL_RANDOM_ROOT_PASSWORD: '1' | |
volumes: | |
- /srv/dev-disk-by-label-Files/Databases/WordPress:/var/lib/mysql |
What do I put for the volumes: variable if I am not using Open Media Vault. Do I create a volume in portainer? I am trying to follow along from the youtube tutorial. Please explain as if you are explaining to someone who has no experience navigating file systems in linux/raspbian.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
So I tried this on x86 based system and confirm it worked
Volumes start with
./
means it will create a folder in the folder where the docker-compose.yml is stored. If you use Portainer or something else you should specify the full path, or use docker volumes.Check the MariaDB logs, I got some permission errors like this
mkdir: cannot create directory '/bitnami/mariadb': Permission denied
It can be fixed by using this command