-
Notifications
You must be signed in to change notification settings - Fork 23
/
docker-compose.apache.test.yml
109 lines (104 loc) · 2.7 KB
/
docker-compose.apache.test.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
version: "2.3"
volumes:
db:
data:
documents:
scripts:
services:
# https://docs.docker.com/docker-hub/builds/automated-testing/
sut:
build:
context: ./test
dockerfile: Dockerfile
depends_on:
- dolibarr_db
- dolibarr
volumes_from:
- dolibarr
volumes:
- data:/var/www/html
- documents:/var/www/documents
- scripts:/var/www/scripts
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
environment:
- DOCKER_TEST_CONTAINER=dolibarr
- DOCKER_WEB_CONTAINER=dolibarr
- DOLI_DB_NAME=${DOLIBARR_DB_NAME}
- DOLI_DB_USER=${DOLIBARR_DB_USER}
- DOLI_DB_PASSWORD=${DOLIBARR_DB_PASSWORD}
dolibarr:
build:
context: ./
dockerfile: Dockerfile
args:
- TAG=${TAG}
- VCS_REF=${VCS_REF}
- BUILD_DATE=${BUILD_DATE}
image: ${IMAGE_NAME}
container_name: dolibarr
#restart: always
depends_on:
dolibarr_db:
condition: service_healthy
links:
- dolibarr_db
expose:
- "80"
#ports:
# - "8080:80"
volumes:
- data:/var/www/html
- documents:/var/www/documents
- scripts:/var/www/scripts
#- /srv/dolibarr/html:/var/www/html
#- /srv/dolibarr/documents:/var/www/documents
#- /srv/dolibarr/scripts:/var/www/scripts
environment:
- DOLI_DB_HOST=dolibarr_db # same as mysql container name
- DOLI_DB_NAME=${DOLIBARR_DB_NAME}
- DOLI_DB_USER=${DOLIBARR_DB_USER}
- DOLI_DB_PASSWORD=${DOLIBARR_DB_PASSWORD}
dolibarr_db:
image: mariadb:latest
container_name: dolibarr_db
#restart: always
command: --character_set_client=utf8 --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --character-set-client-handshake=FALSE
healthcheck:
test:
[
"CMD",
"mysqladmin",
"ping",
"-h",
"localhost",
"--password=${DOLIBARR_DB_ROOT_PWD}",
]
timeout: 10s
retries: 5
expose:
- "3306"
#ports:
# - "33306:3306"
volumes:
- db:/var/lib/mysql
#- /srv/dolibarr/db:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=${DOLIBARR_DB_ROOT_PWD}
- MYSQL_DATABASE=${DOLIBARR_DB_NAME}
- MYSQL_USER=${DOLIBARR_DB_USER}
- MYSQL_PASSWORD=${DOLIBARR_DB_PASSWORD}
dolibarr_mailer:
image: sj26/mailcatcher:latest
hostname: dolibarr_mailer
container_name: dolibarr_mailer
restart: always
expose:
- 1025
ports:
- "1025:1025"
- "1080:1080"
# If you want, you can sync time & timezone with host
#volumes:
# - /etc/localtime:/etc/localtime:ro
# - /etc/timezone:/etc/timezone:ro