Installing Bitnami WordPress Nginx into Apple m1

Preparing Folders

Prepare the a project folders that put your mariadb data and WordPress files data.

# cd ~
# mkdir wp
# cd wp
# mkdir mariadb
# mkdir wordpress

The folders we need

/Users/juzhax/wp
/Users/juzhax/wp/mariadb
/Users/juzhax/wp/wordpress

Preparing the Docker Compose file

touch /Users/juzhax/wp/docker-compose.yml

Insert the data using your favorite editor. I like to use vim

vim /Users/juzhax/wp/docker-compose.yml
version: '2'
services:
  mariadb:
    image: docker.io/bitnami/mariadb:10.6
    volumes:
      - /Users/juzhax/wp/mariadb:/bitnami/mariadb
    environment:
      # ALLOW_EMPTY_PASSWORD is recommended only for development.
      - ALLOW_EMPTY_PASSWORD=yes
      - MARIADB_USER=bn_wordpress
      - MARIADB_DATABASE=bitnami_wordpress
  wordpress:
    image: docker.io/bitnami/wordpress-nginx:5
    ports:
      - '80:8080'
      - '443:8443'
    volumes:
      # - 'wordpress_data:/bitnami/wordpress'
      - /Users/juzhax/wp/wordpress:/bitnami/wordpress
    depends_on:
      - mariadb
    environment:
      # ALLOW_EMPTY_PASSWORD is recommended only for development.
      - ALLOW_EMPTY_PASSWORD=yes
      - WORDPRESS_DATABASE_HOST=mariadb
      - WORDPRESS_DATABASE_PORT_NUMBER=3306
      - WORDPRESS_DATABASE_USER=bn_wordpress
      - WORDPRESS_DATABASE_NAME=bitnami_wordpress

Starting up Bitnami WordPress Nginx

docker-compose up

Checking your data

[email protected] wp % ls -la /Users/juzhax/wp/mariadb 
total 0
drwxr-xr-x   3 juzhax  staff   96 Apr 18 23:54 .
drwxr-xr-x   6 juzhax  staff  192 Apr 18 23:59 ..
drwxr-xr-x  14 juzhax  staff  448 Apr 19 00:13 data
[email protected] wp % ls -la /Users/juzhax/wp/wordpress 
total 16
drwxr-xr-x  4 juzhax  staff   128 Apr 18 23:55 .
drwxr-xr-x  6 juzhax  staff   192 Apr 18 23:59 ..
-r--r-----  1 juzhax  staff  4339 Apr 18 23:55 wp-config.php
drwxrwxr-x  8 juzhax  staff   256 Apr 18 23:56 wp-content
[email protected] wp % 

Login to your localhost WordPress

http://localhost/wp-admin/

username: user
password: bitnami

Tags:

Leave a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.