mirror of
https://github.com/ION606/learn.git
synced 2026-05-14 21:06:56 +00:00
681 B
681 B
Docker Compose
allows running of multiple containers/volumes
Creating
create a docker-compose.yaml file in the root dir of the project
Running
use docker-compose up
Sections
Version
a version number (i.e. version: '3')
services
this is the section containing the different things you want to run for example, if you want to runa web app, and then sql db you would use:
services:
web:
build: .
ports:
- "3000:3000"
db:
image: "mysql"
environment:
# env vars here
ROOT_PASS: password
volumes:
-db-data:/foo
volumes:
-db-data:/foo