Created
September 22, 2022 22:36
-
-
Save xholicka/8e877fd7d1ca5d9a43a3c7f8c35cbeca to your computer and use it in GitHub Desktop.
Wordpress with Docker on Raspberry Pi
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
Install Docker on Raspberry Pi: | |
curl -sSL https://get.docker.com | sh | |
Add user to docker group: | |
sudo usermod -aG docker ${USER} | |
#relog into raspberry pi | |
Contents of docker-compose.yml file: | |
------------------------------------ | |
version: "3.9" | |
services: | |
wpdb: | |
image: lscr.io/linuxserver/mariadb:latest | |
volumes: | |
- /srv/wordpress-db:/config | |
restart: always | |
container_name: wpdb | |
environment: | |
PUID: 1000 | |
PGID: 1000 | |
TZ: Europe/Prague | |
MYSQL_ROOT_PASSWORD: a3l5fFSsadRS2349gnrD #change | |
MYSQL_DATABASE: wordpress | |
MYSQL_USER: wordpress | |
MYSQL_PASSWORD: vFvp5345gfdFSDdaDp4% #change | |
wordpress: | |
depends_on: | |
- wpdb | |
image: wordpress:latest | |
container_name: wordpress | |
volumes: | |
- /srv/wordpress-data:/var/www/html | |
- ./wordpress.ini:/usr/local/etc/php/conf.d/wordpress.ini | |
ports: | |
- "8000:80" | |
restart: always | |
environment: | |
WORDPRESS_DB_HOST: wpdb | |
WORDPRESS_DB_USER: wordpress | |
WORDPRESS_DB_PASSWORD: vFvp5345gfdFSDdaDp4% #change | |
WORDPRESS_DB_NAME: wordpress | |
# phpmyadmin: | |
# depends_on: | |
# - wpdb | |
# image: phpmyadmin:latest | |
# container_name: phpmyadmin | |
# environment: | |
# - PMA_ARBITRARY=1 | |
# #- PMA_HOST=wpdb | |
# #- PMA_VERBOSE=wp-database | |
# #- PMA_USER=wordpress | |
# #- PMA_PASSWORD=vFvp5345gfdFSDdaDp4% | |
# - HIDE_PHP_VERSION=true | |
# restart: always | |
# ports: | |
# - 9001:80 | |
# volumes: | |
# - /sessions | |
--------------------------------------------- | |
Contents of wordpress.ini file: | |
------------------------------ | |
file_uploads = On | |
memory_limit = 256M | |
upload_max_filesize = 256M | |
post_max_size = 256M | |
max_execution_time = 300 | |
max_input_time = 1000 | |
------------------------------- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment