Newer
Older

jurgenhaas
committed
version: '3.3'
{% if drupal.live|default(0) %}
name: {{ projectname }}
{% endif %}

jurgenhaas
committed
networks:
traefik-public:
external: true

jurgenhaas
committed
image: '{{ docker_image_prefix }}{% if dbserver.type == "mariadb" %}wodby/mariadb:{{ dbserver.version }}{% elseif dbserver.type == "mysql" %}mysql/mysql-server:{{ dbserver.version }}{% endif %}'
{% if drupal.live|default(0) %}
restart: unless-stopped
{% endif %}
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: drupal
MYSQL_USER: drupal
MYSQL_PASSWORD: drupal
MYSQL_LOG_CONSOLE: 0
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
{% if drupal.live|default(0) %}
- {{ projectrootdb }}:/var/lib/mysql
{% endif %}
mariadbtest:

jurgenhaas
committed
image: '{{ docker_image_prefix }}{% if dbserver.type == "mariadb" %}wodby/mariadb:{{ dbserver.version }}{% elseif dbserver.type == "mysql" %}mysql/mysql-server:{{ dbserver.version }}{% endif %}'
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: drupal
MYSQL_USER: drupal
MYSQL_PASSWORD: drupal

jurgenhaas
committed
MYSQL_LOG_CONSOLE: 0
volumes:
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
image: '{{ docker_image_prefix }}wodby/drupal-php:{{ php.version }}{% if wkhtmltox.enable %}-dev{% endif %}'
{% if drupal.live|default(0) %}
restart: unless-stopped
{% endif %}
{% elseif mailpit.enable %}
PHP_SENDMAIL_PATH: /usr/sbin/sendmail -t -i -S mailpit:1025
DB_HOST: mariadb
DB_USER: drupal
DB_PASSWORD: drupal
DB_NAME: drupal
DB_DRIVER: mysql
{% if php.xdebug and not drupal.live|default(0) %}
PHP_XDEBUG_MAX_NESTING_LEVEL: 512
PHP_XDEBUG_MODE: {% if php.coverage %}coverage{% elseif php.profiler %}profile{% else %}debug{% endif %}
PHP_XDEBUG_REMOTE_HOST: {{ docker0.ip }}
PHP_XDEBUG_CLIENT_HOST: {{ docker0.ip }}
PHP_XDEBUG_LOG: /dev/null
PHP_XDEBUG_START_WITH_REQUEST: 1

jurgenhaas
committed
DRUSH_ALLOW_XDEBUG: 1
{% if blackfire.enable and not drupal.live|default(0) %}
{% if php.ssh and not drupal.live|default(0) %}

jurgenhaas
committed
SSH_AUTH_SOCK: /ssh-agent
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
- {{ projectroot }}/drush:/etc/drush
- {{ projectrootfiles }}/db:/var/backups/mysql
{% endif %}
{% if php.ssh and not drupal.live|default(0) %}
- {{ php.ssh_auth_sock }}:/ssh-agent
{% if (php.xdebug or webgrind.enable) and not drupal.live|default(0) %}
- {{ projectroot }}/files/debug:/mnt/files
{% endif %}
{% if wkhtmltox.enable %}
- {{ projectroot }}/.docker-init/wkhtmltox.sh:/docker-entrypoint-init.d/50-wkhtmltox.sh

jurgenhaas
committed
{% if php.localip %}
- '{{ projectdomain }}:{{ docker0.ip }}'
{% for subdomain in relatedprojectdomains %}
- '{{ subdomain }}:{{ docker0.ip }}'
{% endfor %}

jurgenhaas
committed
{% endif %}
{% if crontabs.enable|default(0) %}

jurgenhaas
committed
image: '{{ docker_image_prefix }}mcuadros/ofelia:latest'
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
- {{ projectroot }}/crontabs/jobs.ini:/etc/ofelia/config.ini
image: '{{ docker_image_prefix }}{% if webserver.type == "nginx" %}wodby/nginx:{{ webserver.version|default("1.23") }}{% elseif webserver.type == "apache" %}wodby/apache:2.4{% endif %}'
{% if drupal.live|default(0) %}
restart: unless-stopped
{% endif %}

jurgenhaas
committed
networks:
- traefik-public
- default
{% if live is defined and live.uri is defined %}
NGINX_DRUPAL_FILE_PROXY_URL: '{{ live.uri }}'
{% endif %}

jurgenhaas
committed
NGINX_STATIC_CONTENT_OPEN_FILE_CACHE: 'off'
NGINX_VHOST_PRESET: '{{ webserver.preset|default("drupal10") }}'
{% elseif webserver.type == 'apache' %}
{% if webserver.overwriteconfig %}
APACHE_INCLUDE_CONF: /var/www/html/apache/vhost.conf
{% endif %}
{{ webserver.type|upper }}_BACKEND_HOST: php
{{ webserver.type|upper }}_SERVER_ROOT: /var/www/html/{{ webRoot }}/
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro

jurgenhaas
committed
traefik.docker.network: traefik-public
traefik.http.middlewares.{{ webserver.type }}-{{ projectname }}-auth.basicauth.users: {{ basicauth.code }}
{% endif %}
traefik.http.routers.{{ webserver.type }}-{{ projectname }}.rule: Host(`{{ projectdomain }}`){% for domain in extradomains|default([]) %} || Host(`{{ domain }}`){% endfor %}
{% if drupal.live|default(0) or traefik.usessl %}
traefik.http.routers.{{ webserver.type }}-{{ projectname }}.tls: 'true'
traefik.http.routers.{{ webserver.type }}-{{ projectname }}.tls.certresolver: lakedrops
{% endif %}
{% if extradomains|default([]) and basicauth.enable %}
traefik.http.routers.{{ webserver.type }}-{{ projectname }}.middlewares: {{ webserver.type }}-{{ projectname }}-middleware
traefik.http.middlewares.{{ webserver.type }}-{{ projectname }}-middleware.chain.middlewares: {% for domain in extradomains %}{% if loop.index > 1 %},{% endif %}{{ webserver.type }}-{{ projectname }}-redirectregex{{ loop.index }}@docker{% endfor %},{{ webserver.type }}-{{ projectname }}-auth@docker
{% elseif extradomains|default([])|length == 1 %}
traefik.http.routers.{{ webserver.type }}-{{ projectname }}.middlewares: {{ webserver.type }}-{{ projectname }}-redirectregex1@docker
{% elseif extradomains|default([]) %}
traefik.http.routers.{{ webserver.type }}-{{ projectname }}.middlewares: {{ webserver.type }}-{{ projectname }}-middleware
traefik.http.middlewares.{{ webserver.type }}-{{ projectname }}-middleware.chain.middlewares: {% for domain in extradomains %}{% if loop.index > 1 %},{% endif %}{{ webserver.type }}-{{ projectname }}-redirectregex{{ loop.index }}@docker{% endfor %}
{% elseif basicauth.enable %}
traefik.http.routers.{{ webserver.type }}-{{ projectname }}.middlewares: {{ webserver.type }}-{{ projectname }}-auth@docker
{% endif %}
{% for domain in extradomains|default([]) %}
traefik.http.middlewares.{{ webserver.type }}-{{ projectname }}-redirectregex{{ loop.index }}.redirectRegex.regex: "^https://{{ domain }}/(.*)"
traefik.http.middlewares.{{ webserver.type }}-{{ projectname }}-redirectregex{{ loop.index }}.redirectRegex.replacement: "https://{{ projectdomain }}/$${1}"
{% endfor %}

jurgenhaas
committed
image: '{{ docker_image_prefix }}wodby/varnish:6.0'
{% if drupal.live|default(0) %}
restart: unless-stopped
{% endif %}

jurgenhaas
committed
networks:
- traefik-public
- default
VARNISH_BACKEND_HOST: {{ webserver.type }}
volumes:
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro

jurgenhaas
committed
traefik.docker.network: traefik-public
traefik.http.routers.varnish-{{ projectname }}.rule: Host(`varnish-{{ projectdomain }}`)
{% if drupal.live|default(0) or traefik.usessl %}
traefik.http.routers.varnish-{{ projectname }}.tls: 'true'
traefik.http.routers.varnish-{{ projectname }}.tls.certresolver: lakedrops
{% endif %}

jurgenhaas
committed
image: '{{ docker_image_prefix }}wodby/redis:{{ redis.version }}'

jurgenhaas
committed
environment:
REDIS_MAXMEMORY: '{{ redis.max_memory }}'
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
{% if drupal.live|default(0) %}
restart: unless-stopped
{% if dbbrowser.type == 'adminer' %}

jurgenhaas
committed
image: '{{ docker_image_prefix }}wodby/adminer:{{ dbbrowser.version|default("4.6") }}'

jurgenhaas
committed
networks:
- traefik-public
- default
environment:
ADMINER_SALT: adminer-salt
volumes:
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro

jurgenhaas
committed
traefik.docker.network: traefik-public
traefik.http.services.{{ projectname }}_adminer.loadbalancer.server.port: 9000
traefik.http.routers.adminer-{{ projectname }}.rule: Host(`adminer-{{ projectdomain }}`)
{% if drupal.live|default(0) or traefik.usessl %}
traefik.http.routers.adminer-{{ projectname }}.tls: 'true'
traefik.http.routers.adminer-{{ projectname }}.tls.certresolver: lakedrops
{% endif %}
{% elseif dbbrowser.type == 'pma' %}

jurgenhaas
committed
image: '{{ docker_image_prefix }}phpmyadmin/phpmyadmin:latest'

jurgenhaas
committed
networks:
- traefik-public
- default
depends_on:
- mariadb
environment:
PMA_HOST: mariadb
PMA_USER: drupal
PMA_PASSWORD: drupal
PHP_UPLOAD_MAX_FILESIZE: 1G
PHP_MAX_INPUT_VARS: 1G
volumes:
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro

jurgenhaas
committed
traefik.docker.network: traefik-public
traefik.http.routers.pma-{{ projectname }}.rule: Host(`pma-{{ projectdomain }}`)
{% if drupal.live|default(0) or traefik.usessl %}
traefik.http.routers.pma-{{ projectname }}.tls: 'true'
traefik.http.routers.pma-{{ projectname }}.tls.certresolver: lakedrops
{% endif %}

jurgenhaas
committed
image: '{{ docker_image_prefix }}wodby/solr:8-{{ solr.version }}'
{% if drupal.live|default(0) %}
restart: unless-stopped
{% endif %}

jurgenhaas
committed
networks:
- traefik-public
- default
volumes:
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro

jurgenhaas
committed
traefik.docker.network: traefik-public
traefik.http.services.{{ projectname }}_solr.loadbalancer.server.port: 8983
traefik.http.routers.solr-{{ projectname }}.rule: Host(`solr-{{ projectdomain }}`)
{% if drupal.live|default(0) or traefik.usessl %}
traefik.http.routers.solr-{{ projectname }}.tls: 'true'
traefik.http.routers.solr-{{ projectname }}.tls.certresolver: lakedrops
{% endif %}
{% if mailhog.enable and (not drupal.live|default(0) or staging) %}

jurgenhaas
committed
image: '{{ docker_image_prefix }}mailhog/mailhog'
{% if staging %}
restart: unless-stopped
{% endif %}

jurgenhaas
committed
networks:
- traefik-public
- default

jurgenhaas
committed
environment:
MH_OUTGOING_SMTP: /test/mhout.json
privileged: true
volumes:
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro

jurgenhaas
committed
- {{ projectroot }}/tests/mhout.json:/test/mhout.json

jurgenhaas
committed
traefik.docker.network: traefik-public
traefik.http.middlewares.mailhog-{{ projectname }}-auth.basicauth.users: {{ basicauth.code }}
traefik.http.routers.mailhog-{{ projectname }}.middlewares: mailhog-{{ projectname }}-auth@docker
{% endif %}
traefik.http.services.{{ projectname }}_mailhog.loadbalancer.server.port: 8025
traefik.http.routers.mailhog-{{ projectname }}.rule: Host(`mailhog-{{ projectdomain }}`)
{% if drupal.live|default(0) or traefik.usessl %}
traefik.http.routers.mailhog-{{ projectname }}.tls: 'true'
traefik.http.routers.mailhog-{{ projectname }}.tls.certresolver: lakedrops
{% endif %}
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
{% elseif mailpit.enable and (not drupal.live|default(0) or staging) %}
mailpit:
image: '{{ docker_image_prefix }}axllent/mailpit'
{% if staging %}
restart: unless-stopped
{% endif %}
networks:
- traefik-public
- default
environment:
MP_SMTP_RELAY_CONFIG: /test/mailpitout.yml
privileged: true
volumes:
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
- {{ projectroot }}/tests/mailpitout.yml:/test/mailpitout.yml
labels:
traefik.enable: 'true'
traefik.docker.network: traefik-public
{% if basicauth.enable %}
traefik.http.middlewares.mailpit-{{ projectname }}-auth.basicauth.users: {{ basicauth.code }}
traefik.http.routers.mailpit-{{ projectname }}.middlewares: mailpit-{{ projectname }}-auth@docker
{% endif %}
traefik.http.services.{{ projectname }}_mailpit.loadbalancer.server.port: 8025
traefik.http.routers.mailpit-{{ projectname }}.rule: Host(`mailpit-{{ projectdomain }}`)
{% if drupal.live|default(0) or traefik.usessl %}
traefik.http.routers.mailpit-{{ projectname }}.tls: 'true'
traefik.http.routers.mailpit-{{ projectname }}.tls.certresolver: lakedrops
{% endif %}
{% endif %}

jurgenhaas
committed
image: '{{ docker_image_prefix }}wodby/drupal-node:1.0'

jurgenhaas
committed
networks:
- traefik-public
- default

jurgenhaas
committed
traefik.docker.network: traefik-public
traefik.http.services.{{ projectname }}_nodejs.loadbalancer.server.port: 8080
traefik.http.routers.nodejs-{{ projectname }}.rule: Host(`nodejs-{{ projectdomain }}`)
{% if drupal.live|default(0) or traefik.usessl %}
traefik.http.routers.nodejs-{{ projectname }}.tls: 'true'
traefik.http.routers.nodejs-{{ projectname }}.tls.certresolver: lakedrops
{% endif %}
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
- {{ projectroot }}/{{ node.path }}:/app
command: sh -c 'npm install && npm run start'

jurgenhaas
committed
image: '{{ docker_image_prefix }}node:alpine'

jurgenhaas
committed
networks:
- traefik-public
- default

jurgenhaas
committed
traefik.docker.network: traefik-public
traefik.http.services.{{ projectname }}_node.loadbalancer.server.port: 3000
traefik.http.routers.node-{{ projectname }}.rule: Host(`front-{{ projectdomain }}`)
{% if drupal.live|default(0) or traefik.usessl %}
traefik.http.routers.node-{{ projectname }}.tls: 'true'
traefik.http.routers.node-{{ projectname }}.tls.certresolver: lakedrops
{% endif %}

jurgenhaas
committed
- '3000'
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
- {{ projectroot }}/{{ node.path }}:/app

jurgenhaas
committed
image: '{{ docker_image_prefix }}wodby/memcached:1.6'
{% if drupal.live|default(0) %}
restart: unless-stopped
{% endif %}
volumes:
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro

jurgenhaas
committed
image: '{{ docker_image_prefix }}wodby/rsyslog'
{% if drupal.live|default(0) %}
restart: unless-stopped
{% endif %}
volumes:
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro

jurgenhaas
committed
image: '{{ docker_image_prefix }}arachnysdocker/athenapdf-service'
{% if drupal.live|default(0) %}
restart: unless-stopped
{% endif %}
environment:
WEAVER_AUTH_KEY: '{{ athenapdf.key }}'

jurgenhaas
committed
WEAVER_ATHENA_CMD: 'athenapdf -S'
WEAVER_MAX_WORKERS: 10
WEAVER_MAX_CONVERSION_QUEUE: 50
WEAVER_WORKER_TIMEOUT: 90
WEAVER_CONVERSION_FALLBACK: false
volumes:
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
{% if blackfire.enable and not drupal.live|default(0) %}

jurgenhaas
committed
image: '{{ docker_image_prefix }}blackfire/blackfire'
environment:
BLACKFIRE_SERVER_ID: '{{ blackfire.id }}'
BLACKFIRE_SERVER_TOKEN: '{{ blackfire.token }}'
volumes:
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
{% if webgrind.enable and not drupal.live|default(0) %}
webgrind:
# add XDEBUG_PROFILE=1 to your request to profile that

jurgenhaas
committed
image: '{{ docker_image_prefix }}wodby/webgrind:1'

jurgenhaas
committed
networks:
- traefik-public
- default
WEBGRIND_PROFILER_DIR: '/mnt/files/xdebug'

jurgenhaas
committed
traefik.docker.network: traefik-public
traefik.http.services.{{ projectname }}_webgrind.loadbalancer.server.port: 8080
traefik.http.routers.webgrind-{{ projectname }}.rule: Host(`webgrind-{{ projectdomain }}`)
{% if drupal.live|default(0) or traefik.usessl %}
traefik.http.routers.webgrind-{{ projectname }}.tls: 'true'
traefik.http.routers.webgrind-{{ projectname }}.tls.certresolver: lakedrops
{% endif %}
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
- {{ projectroot }}/files/debug:/mnt/files
{% if selenium.enable and not drupal.live|default(0) %}

jurgenhaas
committed
image: '{{ docker_image_prefix }}elgalu/selenium'
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
- /dev/shm:/dev/shm
privileged: true
environment:
SELENIUM_HUB_HOST: 'hub'
SELENIUM_HUB_PORT: '4444'
GRID: 'true'
CHROME: 'false'
FIREFOX: 'false'
depends_on:
- php
chrome:

jurgenhaas
committed
image: '{{ docker_image_prefix }}elgalu/selenium'
depends_on:
- hub
volumes:
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
- /dev/shm:/dev/shm
privileged: true
environment:
NOVNC: 'true'
SELENIUM_HUB_HOST: 'hub'
SELENIUM_HUB_PORT: '4444'
SELENIUM_NODE_HOST: '{{ docker0.ip }}'
SCREEN_WIDTH: '1300'
SCREEN_HEIGHT: '999'
VIDEO: 'false'
GRID: 'false'
CHROME: 'true'
FIREFOX: 'false'
#ports:
# VNC: See what's going on by connecting your VNC client to 0.0.0.0:5900
#- 5900:25900
# noVNC: See what's going on by hitting http://0.0.0.0:6080 in your browser
# Important: http://127.0.0.1:6081 works but http://localhost:6081 doesn't
#- 6080:26080
{% endif %}
{% if elasticsearch.enable %}
elasticsearch:

jurgenhaas
committed
image: '{{ docker_image_prefix }}wodby/elasticsearch:7'
{% if drupal.live|default(0) %}
restart: unless-stopped
{% endif %}
environment:
discovery.type: single-node
ES_JAVA_OPTS: '-Xms512m -Xmx512m'
ports:
- 9200
- 9300
volumes:
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
{% if drupal.live|default(0) %}
{% if alerta is defined %}
alerta:
image: 'registry.lakedrops.com/docker/alerta-proxy:1.0.2'
restart: unless-stopped
tty: true
environment:
- ALERTA_API_KEY={{ alerta.apikey }}
{% if alerta.environment is defined %}
- ALERTA_ENVIRONMENT={{ alerta.environment }}
{% endif %}
{% if alerta.project_id is defined %}
- ALERTA_PROJECT_ID={{ alerta.project_id }}
{% endif %}
{% if alerta.proxy_port is defined %}
- PORT={{ alerta.proxy_port }}
{% endif %}
{% endif %}

jurgenhaas
committed
image: '{{ docker_image_prefix }}b3vis/borgmatic:{{ backup.version }}'
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
- /usr/local/bin/alertalerta.py:/usr/local/bin/alertalerta.py
- {{ projectrootfiles }}:/mnt/source:ro
- {{ projectrootbackup }}/files:/mnt/borg-repository
- {{ projectroot }}/backup:/etc/borgmatic.d/
- {{ projectrootbackup }}/config:/root/.config/borg
- {{ projectrootbackup }}/ssh:/root/.ssh
- {{ projectrootbackup }}/cache:/root/.cache/borg
{% if cypress.enable|default(0) %}
cypress:
image: 'registry.lakedrops.com/docker/cypress:{{ cypress.version }}'
environment:
- CYPRESS_baseUrl={{ projectprotocol }}://{{ projectdomain }}{{ projectport }}

jurgenhaas
committed
{% if mailpit.enable %}
- CYPRESS_mailpitUrl={{ projectprotocol }}://mailpit-{{ projectdomain }}{{ projectport }}
{% endif %}
- CYPRESS_mailhogUrl={{ projectprotocol }}://mailhog-{{ projectdomain }}{{ projectport }}
- PHP_CONTAINER={{ projectname }}-php-1
{% if not drupal.live|default(0) %}
- DISPLAY=:0
network_mode: host
{% endif %}
working_dir: '/e2e'
volumes:
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
- /var/run/docker.sock:/var/run/docker.sock
- {{ projectroot }}/tests/:/e2e
{% if not drupal.live|default(0) %}
- ~/.Xauthority:/root/.Xauthority:ro
entrypoint: cypress open --project /e2e
user: '1000:{{ docker_group_id }}'
{% if unlighthouse.enable|default(0) %}
unlighthouse:
image: 'registry.lakedrops.com/docker/unlighthouse:latest'
restart: unless-stopped
networks:
- traefik-public
- default
volumes:
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
- {{ projectroot }}/tests/unlighthouse/:/data/.unlighthouse
- {{ projectroot }}/tests/unlighthouse.config.ts:/data/unlighthouse.config.ts
working_dir: /data
user: root
labels:
traefik.enable: 'true'
traefik.docker.network: traefik-public
traefik.http.services.{{ projectname }}_unlighthouse.loadbalancer.server.port: 5678
traefik.http.routers.unlighthouse-{{ projectname }}.rule: Host(`unlighthouse-{{ projectdomain }}`)
{% if drupal.live|default(0) or traefik.usessl %}
traefik.http.routers.unlighthouse-{{ projectname }}.tls: 'true'
traefik.http.routers.unlighthouse-{{ projectname }}.tls.certresolver: lakedrops
{% endif %}
{% endif %}
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
{% if invoiceninja.enable|default(0) %}
in-db:
image: 'mysql:5'
environment:
- APP_ENV=production
- 'APP_URL=https://invoice-{{ projectdomain }}'
- 'APP_KEY={{ invoiceninja.api_key }}'
- APP_DEBUG=false
- REQUIRE_HTTPS=false
- PHANTOMJS_PDF_GENERATION=false
- PDF_GENERATOR=snappdf
- QUEUE_CONNECTION=database
- 'TRUSTED_PROXIES=*'
- IS_DOCKER=true
- DB_HOST=in-db
- DB_PORT=3306
- DB_DATABASE=ninja
- DB_USERNAME=ninja
- DB_PASSWORD=ninja
- IN_USER_EMAIL={{ invoiceninja.admin_name }}
- IN_PASSWORD={{ invoiceninja.admin_pass }}
- MAIL_MAILER=smtp
- MAIL_HOST={{ invoiceninja.mail.host }}
- MAIL_PORT={{ invoiceninja.mail.port }}
- MAIL_USERNAME={{ invoiceninja.mail.user }}
- 'MAIL_PASSWORD={{ invoiceninja.mail.pass }}'
- MAIL_ENCRYPTION={{ invoiceninja.mail.security }}
- MAIL_FROM_ADDRESS={{ invoiceninja.mail.user }}
- "MAIL_FROM_NAME='{{ invoiceninja.mail.fromname }}'"
- MYSQL_ROOT_PASSWORD=ninjaAdm1nPassword
- MYSQL_USER=ninja
- MYSQL_PASSWORD=ninja
- MYSQL_DATABASE=ninja
volumes:
- '/etc/timezone:/etc/timezone:ro'
- '/etc/localtime:/etc/localtime:ro'
- '{{ projectrootfiles }}/in/mysql/data:/var/lib/mysql:rw,delegated'
in-app:
image: 'invoiceninja/invoiceninja:5'
depends_on:
- in-db
environment:
- APP_ENV=production
- 'APP_URL=https://invoice-{{ projectdomain }}'
- 'APP_KEY={{ invoiceninja.api_key }}'
- APP_DEBUG=false
- REQUIRE_HTTPS=false
- PHANTOMJS_PDF_GENERATION=false
- PDF_GENERATOR=snappdf
- QUEUE_CONNECTION=database
- 'TRUSTED_PROXIES=*'
- IS_DOCKER=true
- DB_HOST=in-db
- DB_PORT=3306
- DB_DATABASE=ninja
- DB_USERNAME=ninja
- DB_PASSWORD=ninja
- IN_USER_EMAIL={{ invoiceninja.admin_name }}
- IN_PASSWORD={{ invoiceninja.admin_pass }}
- MAIL_MAILER=smtp
- MAIL_HOST={{ invoiceninja.mail.host }}
- MAIL_PORT={{ invoiceninja.mail.port }}
- MAIL_USERNAME={{ invoiceninja.mail.user }}
- 'MAIL_PASSWORD={{ invoiceninja.mail.pass }}'
- MAIL_ENCRYPTION={{ invoiceninja.mail.security }}
- MAIL_FROM_ADDRESS={{ invoiceninja.mail.user }}
- "MAIL_FROM_NAME='{{ invoiceninja.mail.fromname }}'"
- MYSQL_ROOT_PASSWORD=ninjaAdm1nPassword
- MYSQL_USER=ninja
- MYSQL_PASSWORD=ninja
- MYSQL_DATABASE=ninja
volumes:
- '/etc/timezone:/etc/timezone:ro'
- '/etc/localtime:/etc/localtime:ro'
- '{{ projectrootfiles }}/in/app/public:/var/www/app/public:rw,delegated'
- '{{ projectrootfiles }}/in/app/storage:/var/www/app/storage:rw,delegated'
in-web:
image: nginx
networks:
- traefik-public
- default
depends_on:
- in-app
volumes:
- '/etc/timezone:/etc/timezone:ro'
- '/etc/localtime:/etc/localtime:ro'
- '{{ projectroot }}/config/in-vhost.conf:/etc/nginx/conf.d/in-vhost.conf:ro'
- '{{ projectrootfiles }}/in/app/public:/var/www/app/public:ro'
labels:
traefik.enable: 'true'
traefik.docker.network: traefik-public
{% if basicauth.enable %}
traefik.http.middlewares.invoice_ninja-{{ projectname }}-auth.basicauth.users: {{ basicauth.code }}
{% endif %}
'traefik.http.services.invoice_ninja{{ projectname }}.loadbalancer.server.port': 80
'traefik.http.routers.invoice_ninja{{ projectname }}.rule': Host(`invoice-{{ projectdomain }}`)
{% if drupal.live|default(0) or traefik.usessl %}
'traefik.http.routers.invoice_ninja{{ projectname }}.tls': 'true'
'traefik.http.routers.invoice_ninja{{ projectname }}.tls.certresolver': lakedrops
{% endif %}
{% endif %}