-
Notifications
You must be signed in to change notification settings - Fork 23
/
docker-compose.fpm.test.yml
131 lines (125 loc) · 3.36 KB
/
docker-compose.fpm.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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
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
- dolibarr_nginx
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_nginx
- 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:
- "9000"
#ports:
# - "9090:9000"
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_TYPE=pgsql
- DOLI_DB_HOST=dolibarr_db # same as pgsql container name
- DOLI_DB_PORT=5432
- DOLI_DB_NAME=${DOLIBARR_DB_NAME}
- DOLI_DB_USER=${DOLIBARR_DB_USER}
- DOLI_DB_PASSWORD=${DOLIBARR_DB_PASSWORD}
dolibarr_db:
image: postgres:latest
container_name: dolibarr_db
#restart: always
healthcheck:
test: ["CMD", "pg_isready", "-U", "${DOLIBARR_DB_USER}", "-d", "${DOLIBARR_DB_PASSWORD}"]
interval: 60s
retries: 5
#start-period: 10s
mem_limit: 256M
memswap_limit: 256M
expose:
- "5432"
#ports:
# - "55432:5432"
volumes:
- db:/var/lib/postgresql/data
#- /srv/dolibarr/db:/var/lib/postgresql/data
environment:
- POSTGRES_DB=${DOLIBARR_DB_NAME}
- POSTGRES_USER=${DOLIBARR_DB_USER}
- POSTGRES_PASSWORD=${DOLIBARR_DB_PASSWORD}
dolibarr_nginx:
image: nginx:latest
container_name: dolibarr_nginx
#restart: always
expose:
- "80"
#ports:
# - "8080:80"
# # If you need SSL connection
# - "8443:443"
depends_on:
- dolibarr
links:
- dolibarr
volumes:
- data:/var/www/html
#- /srv/dolibarr/html:/var/www/html
- ./nginx/templates:/etc/nginx/templates
# Provide a custom nginx conf
#- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
# If you need SSL connection, you can provide your own certificates
# - ./certs:/etc/letsencrypt
# - ./certs-data:/data/letsencrypt
environment:
- NGINX_HOST=localhost # set your local domain or your live domain
- NGINX_PHP_CGI=dolibarr:9000 # same as dolibarr container name
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