# mssql server image isn't available for arm64 architecture, so we use azure-sql instead
image: mcr.microsoft.com/azure-sql-edge:1.0.4
# If you really want to use MS SQL Server, uncomment the following line
#image: mcr.microsoft.com/mssql/server
...
...
```
```
The compose file defines an application with two services `web` and `db`. The image for the web service is built with the Dockerfile inside the `app` directory (build parameter).
The compose file defines an application with two services `web` and `db`. The image for the web service is built with the Dockerfile inside the `app` directory (build parameter).
@ -28,6 +31,10 @@ The compose file defines an application with two services `web` and `db`. The im
When deploying the application, docker-compose maps the container port 80 to port 80 of the host as specified in the file.
When deploying the application, docker-compose maps the container port 80 to port 80 of the host as specified in the file.
Make sure port 80 on the host is not being used by another container, otherwise the port should be changed.
Make sure port 80 on the host is not being used by another container, otherwise the port should be changed.
> ℹ️**_INFO_**
> For compatibility purpose between `AMD64` and `ARM64` architecture, we use Azure SQL Edge as database instead of MS SQL Server.
> You still can use the MS SQL Server image by uncommenting the following line in the Compose file
This example defines one of the basic setups for Wordpress. More details on how this works can be found on the official [wordpress image page](https://hub.docker.com/_/wordpress).
This example defines one of the basic setups for WordPress. More details on how this works can be found on the official [WordPress image page](https://hub.docker.com/_/wordpress).
Project structure:
Project structure:
@ -13,7 +13,10 @@ Project structure:
```
```
services:
services:
db:
db:
image: mysql:8.0.19
# We use a mariadb image which supports both amd64 & arm64 architecture
image: mariadb:10.6.4-focal
# If you really want to use MySQL, uncomment the following line
#image: mysql:8.0.27
...
...
wordpress:
wordpress:
image: wordpress:latest
image: wordpress:latest
@ -23,9 +26,14 @@ services:
...
...
```
```
When deploying this setup, docker-compose maps the wordpress container port 80 to
When deploying this setup, docker-compose maps the WordPress container port 80 to
port 80 of the host as specified in the compose file.
port 80 of the host as specified in the compose file.
> ℹ️**_INFO_**
> For compatibility purpose between `AMD64` and `ARM64` architecture, we use a MariaDB as database instead of MySQL.
> You still can use the MySQL image by uncommenting the following line in the Compose file
> `#image: mysql:8.0.27`
## Deploy with docker-compose
## Deploy with docker-compose
```
```
@ -48,7 +56,7 @@ CONTAINER ID IMAGE COMMAND CREATED
e0884a8d444d mysql:8.0.19 "docker-entrypoint.s…" 35 seconds ago Up 34 seconds 3306/tcp, 33060/tcp wordpress-mysql_db_1
e0884a8d444d mysql:8.0.19 "docker-entrypoint.s…" 35 seconds ago Up 34 seconds 3306/tcp, 33060/tcp wordpress-mysql_db_1
```
```
Navigate to `http://localhost:80` in your web browser to access Wordpress.
Navigate to `http://localhost:80` in your web browser to access WordPress.
![page](output.jpg)
![page](output.jpg)
@ -58,7 +66,7 @@ Stop and remove the containers
$ docker-compose down
$ docker-compose down
```
```
To remove all Wordpress data, delete the named volumes by passing the `-v` parameter:
To remove all WordPress data, delete the named volumes by passing the `-v` parameter: