"Docker-compose.yml"의 두 판 사이의 차이

 
(같은 사용자의 중간 판 2개는 보이지 않습니다)
2번째 줄: 2번째 줄:
{{소문자}}
{{소문자}}
;docker-compose.yml
;docker-compose.yml
;compose file
;컴포즈 파일


<syntaxhighlight lang='yaml'>
<syntaxhighlight lang='yaml'>
94번째 줄: 96번째 줄:
* https://docs.docker.com/compose/gettingstarted/#step-3-define-services-in-a-compose-file
* https://docs.docker.com/compose/gettingstarted/#step-3-define-services-in-a-compose-file


[[분류: Docker Compose]]
[[분류: docker-compose.yml]]
[[분류: .yml]]

2023년 1월 22일 (일) 00:18 기준 최신판

1 개요[ | ]

docker-compose.yml
compose file
컴포즈 파일
version: "3.9"
services:
  web:
    build: .
    ports:
      - "8000:5000"
  redis:
    image: "redis:alpine"
version: "3.9"
services:
  web:
    build: .
    ports:
      - "8000:5000"
    volumes:
      - .:/code
    environment:
      FLASK_DEBUG: True
  redis:
    image: "redis:alpine"
version: "3.9"  # optional since v1.27.0
services:
  web:
    build: .
    ports:
      - "8000:5000"
    volumes:
      - .:/code
      - logvolume01:/var/log
    depends_on:
      - redis
  redis:
    image: redis
volumes:
  logvolume01: {}
services:
  frontend:
    image: awesome/webapp
    ports:
      - "443:8043"
    networks:
      - front-tier
      - back-tier
    configs:
      - httpd-config
    secrets:
      - server-certificate

  backend:
    image: awesome/database
    volumes:
      - db-data:/etc/data
    networks:
      - back-tier

volumes:
  db-data:
    driver: flocker
    driver_opts:
      size: "10GiB"

configs:
  httpd-config:
    external: true

secrets:
  server-certificate:
    external: true

networks:
  # The presence of these objects is sufficient to define them
  front-tier: {}
  back-tier: {}

2 같이 보기[ | ]

3 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}