docker
docker copied to clipboard
Canno't mount and run database with Docker Composer
Hello , I'am trying to mount database inside volumes on docker composer and then I didn't know how to run this image Odoo with database gived on volumes. I had already mount extra addons gived on the docker composer but canno't mount database which gived on the docker composer .
=> For more details these is my docker comopser (my database is located on my git project + docker composer ) (/dpbox_db contains the db on git project ) Docker Composer File :
version: '2' services: db: image: postgres:9.5 environment: - POSTGRES_PASSWORD=odoo - POSTGRES_USER=odoo - PGDATA=/var/lib/postgresql/data/pgdata volumes: - ./dpbox_db/:/var/lib/postgresql/data odoo11: image: odoo:11.0 ports: - "8076:8069" tty: true links: - db depends_on: - db environment: - PGHOST=db command: -- --dev=reload volumes: - ../extra_addons/:/mnt/extra-addons - ./o_etc:/etc/odoo volumes: db: odoo11:
Please Help to solve my problem thanks .
Cordially Turki Makki.
I hope this can help you, this is working: `version: '2' services: odoo11: container_name: odoo_11 image: odoo:11.0 depends_on: - db ports: - "8069:8069" tty: true command: -- --dev=reload volumes: - ./o_addons:/mnt/extra-addons - ./o_etc:/etc/odoo db: container_name: odoo_db image: postgres:9.5 ports: - "5432:5432" environment: - POSTGRES_PASSWORD=odoo - POSTGRES_USER=odoo
volumes: db: odoo11: ` I add some values like the container name, and expose the ports for pgadmin, so i can access to the database with a postgresql client, like pgadmin.
Can you give more information on the exact problem/error ?
@turkimaki have you found a solution to your issue?