1
0
Fork 0
myserver-configuration/roles/dolibarr/templates/docker-compose.yml.j2

46 lines
1.3 KiB
Django/Jinja

version: '3'
services:
mariadb:
image: mariadb:latest
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: dolibarr
volumes:
- {{ server.work_dir }}/dolibarr/db:/var/lib/mysql
networks:
- internal
dolibarr:
image: tuxgasy/dolibarr:latest
restart: always
container_name: dolibarr
environment:
DOLI_DB_HOST: mariadb
DOLI_DB_USER: root
DOLI_DB_PASSWORD: root
DOLI_DB_NAME: dolibarr
DOLI_URL_ROOT: 'http://0.0.0.0'
DOLI_ADMIN_LOGIN: admin
DOLI_ADMIN_PASSWORD: admin
PHP_INI_DATE_TIMEZONE: 'Europe/Paris'
DOLI_INSTALL_AUTO: 1
volumes:
- {{ server.work_dir }}/dolibarr/base/documents:/var/www/documents
- {{ server.work_dir }}/dolibarr/base/html:/var/www/html/custom
networks:
- proxy
- internal
labels:
- "traefik.enable=true"
- "traefik.http.routers.dolibarr-secure.entrypoints=https"
- "traefik.http.routers.dolibarr-secure.rule=Host(`dolibarr.{{ server.domain }}`)"
- "traefik.http.routers.dolibarr-secure.tls=true"
- "traefik.http.routers.dolibarr-secure.tls.certresolver=sslResolver"
- "traefik.http.routers.dolibarr-secure.middlewares=private-network@file"
- "traefik.docker.network=proxy"
networks:
internal:
proxy:
external: true