lw2 #1
@ -58,3 +58,56 @@ services: #описание контейнеров
|
||||
|
||||
## Разворачивание сервиса Wordpress
|
||||
|
||||
Также в файл `docker-compose.yml` в папке Wordpress прописываем следующий код:
|
||||
|
||||
```yaml
|
||||
version: '3.1'
|
||||
|
||||
services:
|
||||
|
||||
wordpress:
|
||||
image: wordpress
|
||||
restart: always
|
||||
ports:
|
||||
- 8080:80
|
||||
environment:
|
||||
WORDPRESS_DB_HOST: db
|
||||
WORDPRESS_DB_USER: exampleuser
|
||||
WORDPRESS_DB_PASSWORD: examplepass
|
||||
WORDPRESS_DB_NAME: exampledb
|
||||
volumes:
|
||||
- wordpress:/var/www/html
|
||||
|
||||
db:
|
||||
image: mysql:5.7
|
||||
restart: always
|
||||
environment:
|
||||
MYSQL_DATABASE: exampledb
|
||||
MYSQL_USER: exampleuser
|
||||
MYSQL_PASSWORD: examplepass
|
||||
MYSQL_RANDOM_ROOT_PASSWORD: '1'
|
||||
volumes:
|
||||
- db:/var/lib/mysql
|
||||
|
||||
volumes:
|
||||
wordpress:
|
||||
db:
|
||||
```
|
||||
|
||||
Через командную строку разворачиваем сервис:
|
||||
![](shot9.png)
|
||||
|
||||
В Docker Desktop проверяем, что оба контейнера запущены:
|
||||
![](shot10.png)
|
||||
|
||||
Теперь переходим на http://localhost:8080:
|
||||
![](shot11.png)
|
||||
|
||||
И устанавливаем Wordpress:
|
||||
![](shot12.png)
|
||||
|
||||
Далее осуществляем вход и попадаем на главную страницу, что говорит об успешной установке:
|
||||
![](shot13.png)
|
||||
![](shot14.png)
|
||||
|
||||
## Разворачивание сервиса Redmine
|
BIN
tasks/khalitova-am/lab_1/shot10.png
Normal file
BIN
tasks/khalitova-am/lab_1/shot10.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 130 KiB |
BIN
tasks/khalitova-am/lab_1/shot11.png
Normal file
BIN
tasks/khalitova-am/lab_1/shot11.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 102 KiB |
BIN
tasks/khalitova-am/lab_1/shot12.png
Normal file
BIN
tasks/khalitova-am/lab_1/shot12.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 126 KiB |
BIN
tasks/khalitova-am/lab_1/shot13.png
Normal file
BIN
tasks/khalitova-am/lab_1/shot13.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 69 KiB |
BIN
tasks/khalitova-am/lab_1/shot14.png
Normal file
BIN
tasks/khalitova-am/lab_1/shot14.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 226 KiB |
BIN
tasks/khalitova-am/lab_1/shot9.png
Normal file
BIN
tasks/khalitova-am/lab_1/shot9.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 190 KiB |
Loading…
Reference in New Issue
Block a user