📜  odoo 14 docker compose - 任何代码示例

📅  最后修改于: 2022-03-11 15:00:08.933000             🧑  作者: Mango

代码示例1
version: '1.0'services:  # Information needed set up an odoo web  # application container.  web:    image: odoo:14.0    container_name: odoo_14    depends_on:        - db    # Port Mapping    #We need to map the port on the host machine(left side) to the    #Port inside the container on the right. By default Odoo     #Runs on port 8069 and inside the container, it is running on 8069.        #Locally we are going to access it via localhost:9000    ports:      - 9000:8069    # Data Volumes    # --------    #    # This defines files that we are sharing from the host machine    # into the container.    #    #Here we are using to map the extra add ons or enterprise addons    # as well as the configuration file. Also, we need to map the data     #directory where Odoo will storesome attachments etc.    volumes:      - ./data/odoo:/var/lib/odoo        - ./config:/etc/odoo        - ./addons:/mnt/extra        - ./enterprise:/mnt/enterprise    #Username and password of the Host DB    # Make sure to give the same credentials    #inside the postgres service    environment:      - HOST=db      - USER=odoo14      - PASSWORD=odoo14  # All of the information needed to start up a Postgresql  # container.  db:    image: postgres:10    container_name: postgres_10    ports:            -5432:5432    #Add this volume to map the Postgres data. It may be lost    #if we execute docker-compose down where all the data    #in the layered file system will be lost        volumes:            - ./data/postgres:/var/lib/postgresql/data    #make sure to use the same which were given above.    environment:      - POSTGRES_PASSWORD=odoo14      - POSTGRES_USER=odoo14      - POSTGRES_DB=postgres