Resources attached to the Road To DevOps tutorial
https://blog.noobtoroot.xyz/road-to-devops/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
545 B
28 lines
545 B
2 years ago
|
version: "3"
|
||
|
services:
|
||
|
web:
|
||
|
image: web:1
|
||
|
depends_on:
|
||
|
- db
|
||
|
ports:
|
||
|
- 8080:80
|
||
|
environment:
|
||
|
- MYSQL_HOST=db
|
||
|
- MYSQL_DATABASE=docker
|
||
|
- MYSQL_USER=docker
|
||
|
- MYSQL_PASSWORD=docker
|
||
|
db:
|
||
|
image: mariadb:10.7.1
|
||
|
environment:
|
||
|
- MYSQL_ROOT_PASSWORD=docker
|
||
|
- MYSQL_DATABASE=docker
|
||
|
- MYSQL_USER=docker
|
||
|
- MYSQL_PASSWORD=docker
|
||
|
volumes:
|
||
|
- mariadb-data:/var/lib/mysql
|
||
|
deploy:
|
||
|
placement:
|
||
|
constraints: [node.labels.type == db]
|
||
|
volumes:
|
||
|
mariadb-data:
|