add support of arm64 architecture for nginx-aspnet-mysql
Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
This commit is contained in:
		| @@ -24,7 +24,10 @@ services: | |||||||
|     build: backend |     build: backend | ||||||
|     ... |     ... | ||||||
|   db: |   db: | ||||||
|     image: mysql:8.0.19 |     # We use a mariadb image which support 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 | ||||||
|     ... |     ... | ||||||
|   proxy: |   proxy: | ||||||
|     build: proxy |     build: proxy | ||||||
| @@ -36,6 +39,11 @@ The compose file defines an application with three services `proxy`, `backend` a | |||||||
| When deploying the application, docker-compose maps port 80 of the proxy service container to port 80 of the host as specified in the file. | When deploying the application, docker-compose maps port 80 of the proxy service container to port 80 of the host as specified in the file. | ||||||
| Make sure port 80 on the host is not already being in use. | Make sure port 80 on the host is not already being in use. | ||||||
|  |  | ||||||
|  | > ℹ️ **_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 | ||||||
|  |  | ||||||
| ``` | ``` | ||||||
|   | |||||||
| @@ -3,6 +3,6 @@ | |||||||
|     <TargetFramework>net5.0</TargetFramework> |     <TargetFramework>net5.0</TargetFramework> | ||||||
|   </PropertyGroup> |   </PropertyGroup> | ||||||
|   <ItemGroup> |   <ItemGroup> | ||||||
|     <PackageReference Include="MySql.Data" Version="8.0.23" /> |     <PackageReference Include="MySqlConnector" Version="0.61.0" /> | ||||||
|   </ItemGroup> |   </ItemGroup> | ||||||
| </Project> | </Project> | ||||||
| @@ -1,17 +1,21 @@ | |||||||
| services: | services: | ||||||
|   backend: |   backend: | ||||||
|     build: backend |     build: backend | ||||||
|  |     restart: always | ||||||
|     secrets: |     secrets: | ||||||
|       - db-password |       - db-password | ||||||
|     depends_on:  |     depends_on:  | ||||||
|       - db |       - db | ||||||
|     environment: |     environment: | ||||||
|       - ASPNETCORE_URLS=http://+:8000 |       - ASPNETCORE_URLS=http://+:8000 | ||||||
|     depends_on: | #    depends_on: | ||||||
|       db: | #      db: | ||||||
|         condition: service_healthy | #        condition: service_healthy | ||||||
|   db: |   db: | ||||||
|     image: mysql:8.0.19 |     # We use a mariadb image which support 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 | ||||||
|     command: '--default-authentication-plugin=mysql_native_password' |     command: '--default-authentication-plugin=mysql_native_password' | ||||||
|     restart: always |     restart: always | ||||||
|     healthcheck: |     healthcheck: | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user