Skip to content

Commit 7234e31

Browse files
martab1994marqdevx
andauthored
Portenta X8 Wordpress tutorial fix (#577)
* Update content.md Fix typos * Update content/hardware/04.pro/boards/portenta-x8/tutorials/wordpress-webserver/content.md Co-authored-by: Pablo Marquínez Ferrándiz <[email protected]> * Update content/hardware/04.pro/boards/portenta-x8/tutorials/wordpress-webserver/content.md Co-authored-by: Pablo Marquínez Ferrándiz <[email protected]> Co-authored-by: Pablo Marquínez Ferrándiz <[email protected]>
1 parent 9195a61 commit 7234e31

File tree

1 file changed

+9
-9
lines changed
  • content/hardware/04.pro/boards/portenta-x8/tutorials/wordpress-webserver

1 file changed

+9
-9
lines changed

content/hardware/04.pro/boards/portenta-x8/tutorials/wordpress-webserver/content.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ First make sure your Portenta X8 is setup correctly by following the [getting st
3535

3636
### Creating the Docker-compose.yml File
3737

38-
The Wordpress container we use is a multi-container application which also requires a database server container. The Wordpress multi-container application uses Apache as its web server, this is required to make the service work, which is already included in the container so it is nothing for us to worry about. We will be using **mariadb** as our database server container. This container can run on the Portenta X8's architecture. All we need to being installing these containers is to write a **docker-compose.yml** file. This file will contain information about what image we want to install and some important configuration information. Such as the username for the database, password, timezone and database name. The same goes for the Wordpress container, it will contain the password and username, we will also enter the database host name and which container it will use as the database. We recommend that you change the default passwords to more secure ones by replacing the default ones that are stated in the file below.
38+
The Wordpress container we use is a multi-container application, which also requires a database server container. The Wordpress multi-container application uses Apache as its web server. This is required to make the service work and it is already included in the container, so it is nothing for us to worry about. We will be using **mariadb** as our database server container. This container can run on the Portenta X8's architecture. All we need to start using these containers is to write a **docker-compose.yml** file. This file will contain information about what image we want to install and some important configuration information, such as the username for the database, password, timezone and database name. The same goes for the Wordpress container: it will contain the password and username and we will also enter the database host name and which container it will use as database. We recommend that you change the default passwords to more secure ones by replacing the default ones that are stated in the file below.
3939

4040

4141
### The Complete Docker-compose.yml File
@@ -80,29 +80,29 @@ volumes:
8080
db_data: {}
8181
```
8282

83-
Now lets create a directory on our X8 and put this **docker-compose.yml** file on our device.
83+
Now let's create a directory on our X8 and put this **docker-compose.yml** file on our device.
8484

8585
### Installing The Containers
8686

87-
First we create a directory where we want put our **docker-compose.yml** file. Using the `mkdir` command we will create a directory named "wordpress-test". Navigate into this directory with a simple `cd` command. Either copy the docker-compose.yml file into this directory or create it directly here. To create the file we can use `cat > docker-compose.yml`, this will create the file so you can copy contents of the file from above and paste it. Hit enter once to go to a new line and press `ctrl C` to exit the file editor. To copy the file from your computer onto the device use: `adb push <path to docker-compose.yml file> /home/fio/wordpress-test`.
87+
First we create a directory where we want to add our **docker-compose.yml** file. Using the `mkdir` command we will create a directory named "wordpress-test". Navigate into this directory with a simple `cd` command. Either copy the docker-compose.yml file into this directory or create it directly here. To create the file, we can use `cat > docker-compose.yml`, this will create the file, so you can copy contents of the file from above and paste it. Push enter once to go to a new line and press `ctrl C` to exit the file editor. To copy the file from your computer onto the device use: `adb push <path to docker-compose.yml file> /home/fio/wordpress-test`.
8888

8989
![cd into correct directory](assets/webserver-mkdir.png)
9090

9191
Before installing the containers, make sure that no other container is running on the ports that the Wordpress container will use. You can check what containers are running and what port they are using by running the `docker ps -a` command. This will show a list of the currently installed and running containers on the Portenta X8. To remove a container first stop it with `docker stop <container id>`, then you can run `docker rm <container id>` to remove it. If you want more information about handling containers on your Portenta X8, take a look at our [managing containers with docker tutorial](https://docs.arduino.cc/tutorials/portenta-x8/docker-container).
9292

93-
When you are in the correct directory and no other container is running on the ports that Wordpress will use, we can now run `docker compose up -d`. Using the `-d` tag in the command will allow the running of these containers in the background. If you run the command without the `-d` tag the application will exit when you close the terminal. When the command is executed it will start installing the **Wordpress** and **mariadb** containers. This can take a while. To get the output from the containers use: `docker-compose logs -f`. Once it is done we can connect to the device and site.
93+
When you are in the correct directory and no other container is running on the ports that Wordpress will use, you can now run `docker compose up -d`. Using the `-d` tag in the command will allow running these containers in the background. If you run the command without the `-d` tag, the application will exit when you close the terminal. When the command is executed it will start installing the **Wordpress** and **mariadb** containers. This can take a while. To get the output from the containers use: `docker-compose logs -f`. Once it is done you can connect to the device and site.
9494

9595
![Containers install progress in the terminal](assets/webserver-container-install.png)
9696

9797
### Connecting to the Wordpress Site
9898

99-
To connect to the Wordpress setup site we simply need to access it with our Portenta X8s unique id and port. So for example `http://portenta-x8-<uuid>.local:<port>`, where you would substitute the `<uuid>` with your Portenta X8s unique id and the port chosen for the Wordpress container with `<port>`. The `<uuid>` can be found on the setup page that is showed in the [Getting started tutorial](https://docs.arduino.cc/tutorials/portenta-x8/out-of-the-box), you can also see it in the terminal when running `adb`. Or you can go to `http://192.168.7.1:8000` if you use Windows and Linux, on MacOS use `http://192.168.8.1:8000`.
99+
To connect to the Wordpress setup site, you simply need to access it with your Portenta X8s unique id and port. So for example: `http://portenta-x8-<uuid>.local:<port>`, where you would substitute the `<uuid>` with your Portenta X8's unique id and the port chosen for the Wordpress container with `<port>`. The `<uuid>` can be found on the setup page that is showed in the [Getting started tutorial](https://docs.arduino.cc/tutorials/portenta-x8/out-of-the-box), but you can also see it in the terminal when running `adb` or you can go to `http://192.168.7.1:8000` if you use Windows and Linux, on MacOS use `http://192.168.8.1:8000`.
100100

101-
When you connect you should get some feedback in the terminal. Text will begin printing in the terminal, showing you information about the connection that has just been established. Like shown in the image below.
101+
When you connect, you should get some feedback in the terminal. Text will begin printing in the terminal, showing you information about the connection that has just been established as shown in the image below.
102102

103103
![Terminal printout during connection](assets/webserver-connect-terminal.png)
104104

105-
Now you should see a webpage like on the next image in your browser.
105+
Now you should see a webpage, like the following image, in your browser.
106106

107107
![Wordpress setup site](assets/webserver-wordpress-site.png)
108108

@@ -115,6 +115,6 @@ In this tutorial we went through how to install and run a Wordpress and database
115115

116116
## Troubleshooting
117117

118-
- If the containers aren't installing or running correctly check if there are any other containers currently running on the same ports as the ones used by the Wordpress container. You can check this with ``docker ps -a``.
118+
- If the containers are not installing or running correctly, check if there are any other containers currently running on the same ports as the ones used by the Wordpress container. You can check this with ``docker ps -a``.
119119
- If there is any issue running docker commands, make sure you are using ``sudo`` before the commands.
120-
- If you can't connect to the site when everything is running you can double check the X8s ip address. Run the command `ip s a` in the adb shell. This will display the X8s ip address via usb and wifi. Try connecting via those ip addresses if all else fails.
120+
- If you cannot connect to the site when everything is running, you can double check the X8s IP address. Run the command `ip s a` in the **adb shell**. This will display the X8's IP address via USB and WiFi. Try connecting via those IP addresses if all the rest fails.

0 commit comments

Comments
 (0)