docker_otobo_deploy
Differences
This shows you the differences between two versions of the page.
| docker_otobo_deploy [2025/07/26 17:09] – - Imported by DokuWiki Advanced Plugin wikiadm | docker_otobo_deploy [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Deploy OTOBO no Docker ====== | ||
| - | <file bash> | ||
| - | $ git clone https:// | ||
| - | $ git clone https:// | ||
| - | $ cp -a otobo-docker otobo-ti | ||
| - | </ | ||
| - | <file bash> | ||
| - | $ cd otobo-ti | ||
| - | $ cp .docker_compose_env_http .env | ||
| - | </ | ||
| - | |||
| - | <file bash> | ||
| - | $ vim .env | ||
| - | [...] | ||
| - | COMPOSE_PROJECT_NAME=otobo-ti | ||
| - | [...] | ||
| - | OTOBO_DB_ROOT_PASSWORD=senha | ||
| - | [...] | ||
| - | </ | ||
| - | |||
| - | ==== Configuração do volumes ==== | ||
| - | <file bash> | ||
| - | $ mkdir -p volumes/ | ||
| - | $ sudo chown systemd-timesync. volumes/ | ||
| - | </ | ||
| - | |||
| - | **Aterar de:** | ||
| - | <file bash docker-compose/ | ||
| - | $ vim docker-compose/ | ||
| - | # Docker compose file for the OTOBO webapp. | ||
| - | # Note that no port is exposed as both HTTP and HTTPS are supported. | ||
| - | # For HTTP see the extension file docker-compose/ | ||
| - | # For HTTPS see the extension file docker-compose/ | ||
| - | |||
| - | # See also README.md. | ||
| - | |||
| - | # most current docker-compose file version, as of 2020-05-21 | ||
| - | version: ' | ||
| - | |||
| - | services: | ||
| - | |||
| - | # the database | ||
| - | db: | ||
| - | image: ${OTOBO_IMAGE_DB: | ||
| - | user: mysql:mysql | ||
| - | cap_drop: | ||
| - | - ALL | ||
| - | cap_add: | ||
| - | - CAP_SYS_CHROOT | ||
| - | restart: always | ||
| - | logging: | ||
| - | driver: " | ||
| - | options: | ||
| - | max-file: " | ||
| - | max-size: " | ||
| - | volumes: | ||
| - | - mariadb_data:/ | ||
| - | |||
| - | # Within the container network the MariaDB server listens to its default port 3306. | ||
| - | # Per default this port is not exposed to the outside world. | ||
| - | # One can use ' | ||
| - | # But for development it can be useful to expose the port 3306. E.g. when a graphical client | ||
| - | # like MySQL Workbench is used. Uncomment the following lines for making MariaDB available | ||
| - | # on port 3307 on the Docker host. A non-standard port is chosen here, because 3306 is | ||
| - | # often already used on the Docker host. | ||
| - | # ports: | ||
| - | # - " | ||
| - | |||
| - | # Set the db root password which has to be entered when running otobo/ | ||
| - | # The passwort is secret and can be stored in the file .env. | ||
| - | # The content of the .env file is something like: | ||
| - | # OTOBO_DB_ROOT_PASSWORD=otobo_root | ||
| - | environment: | ||
| - | MYSQL_ROOT_PASSWORD: | ||
| - | command: --max-allowed-packet=68157440 --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --innodb-log-file-size=268435456 --query-cache-size=${OTOBO_DB_QUERY_CACHE_SIZE: | ||
| - | |||
| - | # " | ||
| - | # not 0 (failure) otherwise. | ||
| - | # The host is given as db, because localhost might not be resolved on some systems. | ||
| - | # The credentials are not really needed for pinging, but without them we would get " | ||
| - | # every time the health check is executed. | ||
| - | # Note: alternatively / | ||
| - | healthcheck: | ||
| - | test: mysqladmin -h db --user=root --password=' | ||
| - | |||
| - | # a container running a webserver | ||
| - | web: | ||
| - | # The services ' | ||
| - | image: ${OTOBO_IMAGE_OTOBO: | ||
| - | cap_drop: | ||
| - | - ALL | ||
| - | #cap_add: | ||
| - | depends_on: | ||
| - | - db | ||
| - | - elastic | ||
| - | - redis | ||
| - | restart: always | ||
| - | logging: | ||
| - | driver: " | ||
| - | options: | ||
| - | max-file: " | ||
| - | max-size: " | ||
| - | # The HTTP port might be specified in a docker-compose extension file, e.g. docker-compose/ | ||
| - | # For HTTPS no HTTP port is exposed. | ||
| - | #ports: | ||
| - | # - " | ||
| - | volumes: | ||
| - | - opt_otobo:/ | ||
| - | command: web | ||
| - | healthcheck: | ||
| - | test: curl -s -f http:// | ||
| - | |||
| - | # a container running the OTOBO daemon | ||
| - | daemon: | ||
| - | # The services ' | ||
| - | image: ${OTOBO_IMAGE_OTOBO: | ||
| - | cap_drop: | ||
| - | - ALL | ||
| - | #cap_add: | ||
| - | depends_on: | ||
| - | - web | ||
| - | restart: always | ||
| - | logging: | ||
| - | driver: " | ||
| - | options: | ||
| - | max-file: " | ||
| - | max-size: " | ||
| - | volumes: | ||
| - | - opt_otobo:/ | ||
| - | command: daemon | ||
| - | healthcheck: | ||
| - | test: ./ | ||
| - | |||
| - | # a container running Elasticsearch | ||
| - | elastic: | ||
| - | image: ${OTOBO_IMAGE_OTOBO_ELASTICSEARCH: | ||
| - | cap_drop: | ||
| - | - ALL | ||
| - | cap_add: | ||
| - | - CAP_SYS_CHROOT | ||
| - | - CAP_SETUID | ||
| - | - CAP_SETGID | ||
| - | restart: always | ||
| - | logging: | ||
| - | driver: " | ||
| - | options: | ||
| - | max-file: " | ||
| - | max-size: " | ||
| - | environment: | ||
| - | discovery.type: | ||
| - | ES_JAVA_OPTS: | ||
| - | volumes: | ||
| - | - elasticsearch_data:/ | ||
| - | healthcheck: | ||
| - | test: curl -s -f http:// | ||
| - | |||
| - | # a container running Redis | ||
| - | redis: | ||
| - | image: ${OTOBO_IMAGE_REDIS: | ||
| - | user: redis:redis | ||
| - | cap_drop: | ||
| - | - ALL | ||
| - | #cap_add: | ||
| - | restart: always | ||
| - | logging: | ||
| - | driver: " | ||
| - | options: | ||
| - | max-file: " | ||
| - | max-size: " | ||
| - | volumes: | ||
| - | - redis_data:/ | ||
| - | healthcheck: | ||
| - | test: redis-cli ping | ||
| - | |||
| - | |||
| - | # no volumes need to be exposed across services | ||
| - | volumes: | ||
| - | mariadb_data: | ||
| - | opt_otobo: {} | ||
| - | elasticsearch_data: | ||
| - | redis_data: {} | ||
| - | </ | ||
| - | |||
| - | **Para: | ||
| - | <file bash docker-compose/ | ||
| - | $ cat docker-compose/ | ||
| - | # Docker compose file for the OTOBO webapp. | ||
| - | # Note that no port is exposed as both HTTP and HTTPS are supported. | ||
| - | # For HTTP see the extension file docker-compose/ | ||
| - | # For HTTPS see the extension file docker-compose/ | ||
| - | |||
| - | # See also README.md. | ||
| - | |||
| - | # most current docker-compose file version, as of 2020-05-21 | ||
| - | version: ' | ||
| - | |||
| - | services: | ||
| - | |||
| - | # the database | ||
| - | db: | ||
| - | image: ${OTOBO_IMAGE_DB: | ||
| - | user: mysql:mysql | ||
| - | cap_drop: | ||
| - | - ALL | ||
| - | cap_add: | ||
| - | - CAP_SYS_CHROOT | ||
| - | restart: always | ||
| - | logging: | ||
| - | driver: " | ||
| - | options: | ||
| - | max-file: " | ||
| - | max-size: " | ||
| - | volumes: | ||
| - | #- mariadb_data:/ | ||
| - | # Adicionar | ||
| - | - " | ||
| - | |||
| - | # Within the container network the MariaDB server listens to its default port 3306. | ||
| - | # Per default this port is not exposed to the outside world. | ||
| - | # One can use ' | ||
| - | # But for development it can be useful to expose the port 3306. E.g. when a graphical client | ||
| - | # like MySQL Workbench is used. Uncomment the following lines for making MariaDB available | ||
| - | # on port 3307 on the Docker host. A non-standard port is chosen here, because 3306 is | ||
| - | # often already used on the Docker host. | ||
| - | # ports: | ||
| - | # - " | ||
| - | |||
| - | # Set the db root password which has to be entered when running otobo/ | ||
| - | # The passwort is secret and can be stored in the file .env. | ||
| - | # The content of the .env file is something like: | ||
| - | # OTOBO_DB_ROOT_PASSWORD=otobo_root | ||
| - | environment: | ||
| - | MYSQL_ROOT_PASSWORD: | ||
| - | command: --max-allowed-packet=68157440 --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --innodb-log-file-size=268435456 --query-cache-size=${OTOBO_DB_QUERY_CACHE_SIZE: | ||
| - | |||
| - | # " | ||
| - | # not 0 (failure) otherwise. | ||
| - | # The host is given as db, because localhost might not be resolved on some systems. | ||
| - | # The credentials are not really needed for pinging, but without them we would get " | ||
| - | # every time the health check is executed. | ||
| - | # Note: alternatively / | ||
| - | healthcheck: | ||
| - | test: mysqladmin -h db --user=root --password=' | ||
| - | |||
| - | # a container running a webserver | ||
| - | web: | ||
| - | # The services ' | ||
| - | image: ${OTOBO_IMAGE_OTOBO: | ||
| - | cap_drop: | ||
| - | - ALL | ||
| - | #cap_add: | ||
| - | depends_on: | ||
| - | - db | ||
| - | - elastic | ||
| - | - redis | ||
| - | restart: always | ||
| - | logging: | ||
| - | driver: " | ||
| - | options: | ||
| - | max-file: " | ||
| - | max-size: " | ||
| - | # The HTTP port might be specified in a docker-compose extension file, e.g. docker-compose/ | ||
| - | # For HTTPS no HTTP port is exposed. | ||
| - | #ports: | ||
| - | # - " | ||
| - | volumes: | ||
| - | #- opt_otobo:/ | ||
| - | # Adicionar: | ||
| - | - " | ||
| - | command: web | ||
| - | healthcheck: | ||
| - | test: curl -s -f http:// | ||
| - | |||
| - | # a container running the OTOBO daemon | ||
| - | daemon: | ||
| - | # The services ' | ||
| - | image: ${OTOBO_IMAGE_OTOBO: | ||
| - | cap_drop: | ||
| - | - ALL | ||
| - | #cap_add: | ||
| - | depends_on: | ||
| - | - web | ||
| - | restart: always | ||
| - | logging: | ||
| - | driver: " | ||
| - | options: | ||
| - | max-file: " | ||
| - | max-size: " | ||
| - | volumes: | ||
| - | #- opt_otobo:/ | ||
| - | # Adicionar: | ||
| - | - " | ||
| - | command: daemon | ||
| - | healthcheck: | ||
| - | test: ./ | ||
| - | |||
| - | # a container running Elasticsearch | ||
| - | elastic: | ||
| - | image: ${OTOBO_IMAGE_OTOBO_ELASTICSEARCH: | ||
| - | cap_drop: | ||
| - | - ALL | ||
| - | cap_add: | ||
| - | - CAP_SYS_CHROOT | ||
| - | - CAP_SETUID | ||
| - | - CAP_SETGID | ||
| - | restart: always | ||
| - | logging: | ||
| - | driver: " | ||
| - | options: | ||
| - | max-file: " | ||
| - | max-size: " | ||
| - | environment: | ||
| - | discovery.type: | ||
| - | ES_JAVA_OPTS: | ||
| - | volumes: | ||
| - | #- elasticsearch_data:/ | ||
| - | # Adicionar: | ||
| - | - " | ||
| - | healthcheck: | ||
| - | test: curl -s -f http:// | ||
| - | |||
| - | # a container running Redis | ||
| - | redis: | ||
| - | image: ${OTOBO_IMAGE_REDIS: | ||
| - | user: redis:redis | ||
| - | cap_drop: | ||
| - | - ALL | ||
| - | #cap_add: | ||
| - | restart: always | ||
| - | logging: | ||
| - | driver: " | ||
| - | options: | ||
| - | max-file: " | ||
| - | max-size: " | ||
| - | volumes: | ||
| - | #- redis_data:/ | ||
| - | # Adicionar: | ||
| - | - " | ||
| - | healthcheck: | ||
| - | test: redis-cli ping | ||
| - | |||
| - | # Default | ||
| - | # no volumes need to be exposed across services | ||
| - | #volumes: | ||
| - | # mariadb_data: | ||
| - | # opt_otobo: {} | ||
| - | # elasticsearch_data: | ||
| - | # redis_data: {} | ||
| - | </ | ||
| - | |||
| - | **Trechos modificados** | ||
| - | <file bash> | ||
| - | db: | ||
| - | [...] | ||
| - | volumes: | ||
| - | #- mariadb_data:/ | ||
| - | # Adicionar | ||
| - | - " | ||
| - | [...] | ||
| - | |||
| - | web: | ||
| - | [...] | ||
| - | volumes: | ||
| - | #- opt_otobo:/ | ||
| - | # Adicionar: | ||
| - | - " | ||
| - | [...] | ||
| - | |||
| - | daemon: | ||
| - | [...] | ||
| - | volumes: | ||
| - | #- opt_otobo:/ | ||
| - | # Adicionar: | ||
| - | - " | ||
| - | [...] | ||
| - | |||
| - | elastic: | ||
| - | [...] | ||
| - | volumes: | ||
| - | #- elasticsearch_data:/ | ||
| - | # Adicionar: | ||
| - | - " | ||
| - | [...] | ||
| - | |||
| - | redis: | ||
| - | [...] | ||
| - | volumes: | ||
| - | #- redis_data:/ | ||
| - | # Adicionar: | ||
| - | - " | ||
| - | [...] | ||
| - | |||
| - | # Default | ||
| - | # no volumes need to be exposed across services | ||
| - | #volumes: | ||
| - | # mariadb_data: | ||
| - | # opt_otobo: {} | ||
| - | # elasticsearch_data: | ||
| - | # redis_data: {} | ||
| - | </ | ||
| - | |||
| - | ==== Alterar a porta ==== | ||
| - | <file bash> | ||
| - | $ vim docker-compose/ | ||
| - | # Run the OTOBO web app via HTTP on the port $OTOBO_WEB_HTTP_PORT or port 80 per default. | ||
| - | # The HTTP port is set up in a extension file because there are use cases that have no HTTP port exposed. | ||
| - | |||
| - | # See also README.md. | ||
| - | |||
| - | # most current docker-compose file version, as of 2020-05-21 | ||
| - | version: ' | ||
| - | |||
| - | services: | ||
| - | |||
| - | web: | ||
| - | ports: | ||
| - | #- " | ||
| - | - " | ||
| - | </ | ||
| - | |||
| - | ==== Executando o deploy ==== | ||
| - | |||
| - | <file bash> | ||
| - | $ docker-compose up -d | ||
| - | </ | ||
| - | |||
| - | ===== Configuração do nginx ===== | ||
| - | |||
| - | <file bash otobo-ti.juntotelecom.com.br> | ||
| - | $ sudo vim / | ||
| - | server { | ||
| - | listen 80; | ||
| - | server_name otobo-ti.juntotelecom.com.br; | ||
| - | |||
| - | location / { | ||
| - | proxy_http_version 1.1; | ||
| - | proxy_set_header Host $host; | ||
| - | proxy_set_header X-Real-IP $remote_addr; | ||
| - | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
| - | proxy_set_header X-Forwarded-Proto $scheme; | ||
| - | proxy_set_header Upgrade $http_upgrade; | ||
| - | proxy_set_header Connection " | ||
| - | proxy_pass http:// | ||
| - | } | ||
| - | } | ||
| - | </ | ||
| - | |||
| - | <file bash> | ||
| - | $ sudo ln -s / | ||
| - | </ | ||
| - | |||
| - | <file bash> | ||
| - | $ sudo nginx -t | ||
| - | nginx: the configuration file / | ||
| - | nginx: configuration file / | ||
| - | </ | ||
| - | |||
| - | <file bash> | ||
| - | $ sudo systemctl restart nginx | ||
| - | </ | ||
| - | |||
| - | ==== Instalação ==== | ||
| - | |||
| - | '' | ||
| - | |||
| - | {{: | ||
| - | |||
| - | {{: | ||
| - | |||
| - | {{: | ||
| - | |||
| - | {{: | ||
| - | |||
| - | {{: | ||
| - | |||
| - | {{: | ||
| - | |||
| - | {{: | ||
| - | |||
| - | {{: | ||
docker_otobo_deploy.1753560543.txt.gz · Last modified: by wikiadm
