Super-Visions / docker-itop

https://hub.docker.com/r/supervisions/itop/
18 stars 19 forks source link

docker-compose image #20

Open anc-tvr opened 3 days ago

anc-tvr commented 3 days ago

Hello! I'm very interested in running iTop via docker-compose, but I unfortunately don't know the exact variables and relations. Do you have any examples to start container via docker-compose? I'd be very grateful if you'd help me with this and I suppose other people who are interested in this project would be grateful too. And in general, it would be great if such a file existed in your repo.

Hipska commented 3 days ago

I completely understand, but these files are always different for everyone's preference and use case, so I didn't want to add such opinionated file in the repo. However, I'm open to contributions of you or anybody else has a very good example.

Find below an example I use for developing datamodels for a customer, running iTop in production would look different, so be aware to use this example with caution.

services:
  itop:
    image: supervisions/itop:3.2.0
    volumes:
    - ./iTop-datamodel:/var/www/html/extensions/my_project-datamodel:rw
    - ./env-production:/var/www/html/env-production
    - conf:/var/www/html/conf
    - data:/var/www/html/data
    - ~/vagrant/itop/extensions/sv-geolocation:/var/www/html/extensions/sv-geolocation:rw
    - ~/vagrant/itop/extensions/sv-display-mgmt:/var/www/html/extensions/sv-display-mgmt:rw
    - ~/vagrant/itop/extensions/sv-room-mgmt:/var/www/html/extensions/sv-room-mgmt:rw
    - ~/vagrant/itop/extensions/sv-auto-dispatch:/var/www/html/extensions/sv-auto-dispatch:rw
    - ~/vagrant/itop/toolkit:/var/www/html/toolkit:ro
    - ~/vagrant/itop/tools:/var/www/html/tools:ro
    environment:
      VIRTUAL_HOST: my_project.docker.super-visions.com
      # DB_ENV_MYSQL_DATABASE: itop
      # DB_ENV_MYSQL_USER: itop
      # DB_ENV_MYSQL_PASSWORD: itop
    links:
    - db
    network_mode: bridge
  db:
    image: mariadb
    command: --max_allowed_packet=33554432
    volumes:
    - ./itop-dump.sql.gz:/docker-entrypoint-initdb.d/01-itop-dump.sql.gz
    environment:
      MYSQL_DATABASE: itop
      MYSQL_USER: itop
      MYSQL_PASSWORD: itop
      MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
    network_mode: bridge
volumes:
  conf:
  data:

PS: If you search on "compose", you will also find a lot of examples: https://github.com/Super-Visions/docker-itop/issues?q=is%3Aissue+compose