[docker compose, ubuntu] 도커 컴포우즈에서 volume 경로 설정

 

 

volumes:
  data:
  db:

 

volumes:
  data:
    driver: local
    driver_opts:
      type: 'none'
      o: 'bind'
      device: '/vo2/docker/odoo/data'     #원하는 경로

  db:
    driver: local
    driver_opts:
      type: 'none'
      o: 'bind'
      device: '/vo2/docker/odoo/db'     #원하는 경로

 

 

version: '3.1'
services:
  odoo:
    image: odoo:16.0
    env_file: .env
    depends_on:
      - psql
    ports:
      - "8069:8069" #port mapping(custom-port:8069)
    volumes:
      - data:/var/lib/odoo
      - ./config:/etc/odoo
      - ./custom-addons:/mnt/extra-addons
  psql:
    image: postgres:13
    env_file: .env
    volumes:
      - db:/var/lib/pgsql/data/pgdata
volumes:
  data:
    driver: local
    driver_opts:
      type: 'none'
      o: 'bind'
      device: '/vo2/docker/odoo/data'     #원하는 경로

  db:
    driver: local
    driver_opts:
      type: 'none'
      o: 'bind'
      device: '/vo2/docker/odoo/db'     #원하는 경로

 

 

 

 

 

삭제하시겠습니까?
취소
취소

LOGIN

SEARCH

MENU NAVIGATION