Skip to content

Commit 6d59336

Browse files
authored
Update README.md
1 parent a05094a commit 6d59336

File tree

1 file changed

+27
-9
lines changed

1 file changed

+27
-9
lines changed

README.md

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ services:
2727
volumes:
2828
- espocrm-db:/var/lib/mysql
2929
restart: always
30+
healthcheck:
31+
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
32+
interval: 20s
33+
start_period: 10s
34+
timeout: 10s
35+
retries: 3
3036
3137
espocrm:
3238
image: espocrm/espocrm
@@ -43,7 +49,8 @@ services:
4349
- espocrm:/var/www/html
4450
restart: always
4551
depends_on:
46-
- espocrm-db
52+
espocrm-db:
53+
condition: service_healthy
4754
ports:
4855
- 8080:80
4956
@@ -88,27 +95,38 @@ Example `docker-compose.yml`:
8895
```
8996
services:
9097
91-
mysql:
92-
container_name: mysql
93-
image: mysql:8
94-
command: --default-authentication-plugin=mysql_native_password
98+
espocrm-db:
99+
container_name: espocrm-db
100+
image: mariadb:latest
95101
restart: always
96102
environment:
97-
MYSQL_ROOT_PASSWORD: example
103+
MARIADB_ROOT_PASSWORD: root_password
104+
MARIADB_DATABASE: espocrm
105+
MARIADB_USER: espocrm
106+
MARIADB_PASSWORD: database_password
98107
volumes:
99-
- mysql:/var/lib/mysql
108+
- espocrm-db:/var/lib/mysql
109+
healthcheck:
110+
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
111+
interval: 20s
112+
start_period: 10s
113+
timeout: 10s
114+
retries: 3
100115
101116
espocrm:
102117
container_name: espocrm
103118
build:
104119
context: ./apache
105120
dockerfile: Dockerfile
106121
environment:
107-
ESPOCRM_DATABASE_PASSWORD: example
122+
ESPOCRM_DATABASE_PASSWORD: database_password
108123
ESPOCRM_ADMIN_USERNAME: admin
109124
ESPOCRM_ADMIN_PASSWORD: password
110125
ESPOCRM_SITE_URL: "http://localhost:8080"
111126
restart: always
127+
depends_on:
128+
espocrm-db:
129+
condition: service_healthy
112130
ports:
113131
- 8080:80
114132
volumes:
@@ -125,7 +143,7 @@ services:
125143
entrypoint: docker-daemon.sh
126144
127145
volumes:
128-
mysql:
146+
espocrm-db:
129147
espocrm:
130148
```
131149

0 commit comments

Comments
 (0)