forked from ethibox/awesome-stacks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdolibarr.yml
53 lines (49 loc) · 1.53 KB
/
dolibarr.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# DOMAIN=example.com docker stack deploy -c dolibarr.yml dolibarr
# chown -R 33:33 data documents
# wget https://github.com/Dolibarr/dolibarr/archive/20.0.1.tar.gz
services:
dolibarr:
image: ${IMAGE:-dolibarr/dolibarr}:${VERSION:-20.0.1}
environment:
- DOLI_DB_HOST=mariadb
- DOLI_DB_NAME=dolibarr
- DOLI_DB_USER=dolibarr
- DOLI_DB_PASSWORD=myp@ssw0rd
- DOLI_ADMIN_LOGIN=${ADMIN_USERNAME:-admin}
- DOLI_ADMIN_PASSWORD=${ADMIN_PASSWORD:-myp@ssw0rd}
volumes:
- ${VOLUME_PATH}data:/var/www/html
- ${VOLUME_PATH}documents:/var/www/documents
deploy:
labels:
- traefik.enable=true
- traefik.http.routers.dolibarr-${NUMBER:-1}.rule=Host(`${DOMAIN:-dolibarr.localhost}`)
- traefik.http.routers.dolibarr-${NUMBER:-1}.entrypoints=${SCHEME:-https}
- traefik.http.routers.dolibarr-${NUMBER:-1}.service=dolibarr-${NUMBER:-1}
- traefik.http.routers.dolibarr-${NUMBER:-1}.tls.certresolver=letsencrypt
- traefik.http.services.dolibarr-${NUMBER:-1}.loadbalancer.server.port=80
networks:
- internal
- traefik
mariadb:
image: mariadb:10.5.9
volumes:
- ${VOLUME_PATH}mariadb:/var/lib/mysql:cached
environment:
- MYSQL_ROOT_PASSWORD=myp@ssw0rd
- MYSQL_DATABASE=dolibarr
- MYSQL_USER=dolibarr
- MYSQL_PASSWORD=myp@ssw0rd
networks:
- internal
volumes:
data:
mariadb:
documents:
networks:
internal:
driver: overlay
attachable: true
traefik:
external: true
name: traefik-net