mirror of
https://github.com/bitnami/containers.git
synced 2026-03-06 06:58:01 +08:00
Add the bash and yaml syntax highlight
This commit is contained in:
@@ -21,7 +21,7 @@ Running Magento with a database server is the recommended way. You can either us
|
||||
|
||||
This is the recommended way to run Magento. You can use the following docker compose template:
|
||||
|
||||
```
|
||||
```yaml
|
||||
version: '2'
|
||||
|
||||
services:
|
||||
@@ -58,13 +58,13 @@ If you want to run the application manually instead of using docker-compose, the
|
||||
|
||||
1. Create a new network for the application and the database:
|
||||
|
||||
```
|
||||
```bash
|
||||
$ docker network create magento_network
|
||||
```
|
||||
|
||||
2. Start a MariaDB database in the network generated:
|
||||
|
||||
```
|
||||
```bash
|
||||
$ docker run -d --name mariadb --net=magento_network bitnami/mariadb
|
||||
```
|
||||
|
||||
@@ -72,7 +72,7 @@ If you want to run the application manually instead of using docker-compose, the
|
||||
|
||||
3. Run the Magento container:
|
||||
|
||||
```
|
||||
```bash
|
||||
$ docker run -d -p 80:80 --name magento --net=magento_network bitnami/magento
|
||||
```
|
||||
|
||||
@@ -93,7 +93,8 @@ To avoid inadvertent removal of these volumes you can [mount host directories as
|
||||
### Mount host directories as data volumes with Docker Compose
|
||||
|
||||
This requires a minor change to the `docker-compose.yml` template previously shown:
|
||||
```
|
||||
|
||||
```yaml
|
||||
version: '2'
|
||||
|
||||
services:
|
||||
@@ -121,13 +122,13 @@ In this case you need to specify the directories to mount on the run command. Th
|
||||
|
||||
1. Create a network (if it does not exist):
|
||||
|
||||
```
|
||||
```bash
|
||||
$ docker network create magento-tier
|
||||
```
|
||||
|
||||
2. Create a MariaDB container with host volume:
|
||||
|
||||
```
|
||||
```bash
|
||||
$ docker run -d --name mariadb \
|
||||
--net magento-tier \
|
||||
--volume /path/to/mariadb-persistence:/bitnami/mariadb \
|
||||
@@ -138,7 +139,7 @@ In this case you need to specify the directories to mount on the run command. Th
|
||||
|
||||
3. Create the Magento container with host volumes:
|
||||
|
||||
```
|
||||
```bash
|
||||
$ docker run -d --name magento -p 80:80 -p 443:443 \
|
||||
--net magento-tier \
|
||||
--volume /path/to/magento-persistence:/bitnami/magento \
|
||||
@@ -153,7 +154,7 @@ Bitnami provides up-to-date versions of MariaDB and Magento, including security
|
||||
|
||||
1. Get the updated images:
|
||||
|
||||
```
|
||||
```bash
|
||||
$ docker pull bitnami/magento:latest
|
||||
```
|
||||
|
||||
@@ -179,7 +180,7 @@ Bitnami provides up-to-date versions of MariaDB and Magento, including security
|
||||
When you start the magento image, you can adjust the configuration of the instance by passing one or more environment variables either on the docker-compose file or on the docker run command line. If you want to add a new environment variable:
|
||||
|
||||
* For docker-compose add the variable name and value under the application section:
|
||||
```
|
||||
```yaml
|
||||
application:
|
||||
image: bitnami/magento:latest
|
||||
ports:
|
||||
@@ -192,7 +193,7 @@ application:
|
||||
|
||||
* For manual execution add a `-e` option with each variable and value:
|
||||
|
||||
```
|
||||
```bash
|
||||
$ docker run -d -e MAGENTO_PASSWORD=my_password1234 -p 80:80 --name magento -v /your/local/path/bitnami/magento:/bitnami/magento --net=magento_network bitnami/magento
|
||||
```
|
||||
|
||||
@@ -222,7 +223,7 @@ To backup your application data follow these steps:
|
||||
|
||||
2. Copy the Magento data folder in the host:
|
||||
|
||||
```
|
||||
```bash
|
||||
$ docker cp /your/local/path/bitnami:/bitnami/magento
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user