Skip to content

Commit cea97c3

Browse files
committed
v9.3.0
1 parent 67718ad commit cea97c3

12 files changed

Lines changed: 222 additions & 114 deletions

apache/Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM php:8.3-apache
1+
FROM php:8.4-apache
22

33
LABEL org.opencontainers.image.source=https://github.com/espocrm/espocrm
44
LABEL org.opencontainers.image.description="EspoCRM is an Open Source CRM. Try for Free."
@@ -96,16 +96,16 @@ RUN { \
9696

9797
RUN a2enmod rewrite;
9898

99-
ENV ESPOCRM_VERSION 9.2.7
100-
ENV ESPOCRM_SHA256 0156a51cda2225b8daa4b14fc288cb9c5336beb58c4b31de8d4d38eb8b8a33bd
99+
ENV ESPOCRM_VERSION 9.3.0
100+
ENV ESPOCRM_SHA256 021b15a4376e194f12273009ba6cd61f57fec685d6863ce64a3df412acc2f0b9
101101

102102
WORKDIR /var/www/html
103103

104104
RUN set -ex; \
105-
curl -fSL "https://www.espocrm.com/downloads/EspoCRM-9.2.7.zip" -o EspoCRM.zip; \
105+
curl -fSL "https://www.espocrm.com/downloads/EspoCRM-9.3.0.zip" -o EspoCRM.zip; \
106106
echo "${ESPOCRM_SHA256} *EspoCRM.zip" | sha256sum -c -; \
107107
unzip -q EspoCRM.zip -d /usr/src; \
108-
mv "/usr/src/EspoCRM-9.2.7" /usr/src/espocrm; \
108+
mv "/usr/src/EspoCRM-9.3.0" /usr/src/espocrm; \
109109
rm EspoCRM.zip
110110

111111
COPY ./docker-*.sh /usr/local/bin/

apache/docker-daemon.sh

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,30 @@ getConfigParamFromFile() {
2828
local name="$1"
2929

3030
php -r "
31+
if (file_exists('/var/www/html/data/state.php')) {
32+
\$config=include('/var/www/html/data/state.php');
33+
34+
if (array_key_exists('$name', \$config)) {
35+
echo \$config['$name'];
36+
exit;
37+
}
38+
}
39+
3140
if (file_exists('/var/www/html/data/config-internal.php')) {
3241
\$config=include('/var/www/html/data/config-internal.php');
3342
3443
if (array_key_exists('$name', \$config)) {
35-
die(\$config['$name']);
44+
echo \$config['$name'];
45+
exit;
3646
}
3747
}
3848
3949
if (file_exists('/var/www/html/data/config.php')) {
4050
\$config=include('/var/www/html/data/config.php');
4151
4252
if (array_key_exists('$name', \$config)) {
43-
die(\$config['$name']);
53+
echo \$config['$name'];
54+
exit;
4455
}
4556
}
4657
"
@@ -118,14 +129,14 @@ checkInstanceReady() {
118129
local isInstalled=$(getConfigParamFromFile "isInstalled")
119130

120131
if [ -z "$isInstalled" ] || [ "$isInstalled" != 1 ]; then
121-
echo >&2 "Instance is not ready: waiting for the installation"
132+
echo >&2 "Instance is not ready: installation in progress"
122133
exit 0
123134
fi
124135

125136
local maintenanceMode=$(getConfigParamFromFile "maintenanceMode")
126137

127138
if [ -n "$maintenanceMode" ] && [ "$maintenanceMode" = 1 ]; then
128-
echo >&2 "Instance is not ready: waiting for the upgrade"
139+
echo >&2 "Instance is not ready: waiting for maintenance mode to be disabled"
129140
exit 0
130141
fi
131142

@@ -139,18 +150,19 @@ isDatabaseReady() {
139150
require_once('/var/www/html/bootstrap.php');
140151
141152
\$app = new \Espo\Core\Application();
142-
\$config = \$app->getContainer()->get('config');
143153
144-
\$helper = new \Espo\Core\Utils\Database\Helper(\$config);
154+
\$injectableFactory = \$app->getContainer()->get('injectableFactory');
155+
\$helper = \$injectableFactory->create('\\Espo\\Core\\Utils\\Database\\Helper');
145156
146157
try {
147-
\$helper->createPdoConnection();
158+
\$helper->createPDO();
148159
}
149160
catch (Exception \$e) {
150-
die(false);
161+
echo false;
162+
exit;
151163
}
152164
153-
die(true);
165+
echo true;
154166
"
155167
}
156168

@@ -163,11 +175,11 @@ verifyDatabaseReady() {
163175
return 0 #true
164176
fi
165177

166-
echo >&2 "Waiting Database for receiving connections..."
178+
echo >&2 "Waiting for database connection (attempt $i/40)..."
167179
sleep 3
168180
done
169181

170-
echo >&2 "error: Database is not available"
182+
echo >&2 "error: Database connection failed"
171183
return 1 #false
172184
}
173185

apache/docker-entrypoint.sh

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,30 @@ getConfigParamFromFile() {
2828
local name="$1"
2929

3030
php -r "
31+
if (file_exists('/var/www/html/data/state.php')) {
32+
\$config=include('/var/www/html/data/state.php');
33+
34+
if (array_key_exists('$name', \$config)) {
35+
echo \$config['$name'];
36+
exit;
37+
}
38+
}
39+
3140
if (file_exists('/var/www/html/data/config-internal.php')) {
3241
\$config=include('/var/www/html/data/config-internal.php');
3342
3443
if (array_key_exists('$name', \$config)) {
35-
die(\$config['$name']);
44+
echo \$config['$name'];
45+
exit;
3646
}
3747
}
3848
3949
if (file_exists('/var/www/html/data/config.php')) {
4050
\$config=include('/var/www/html/data/config.php');
4151
4252
if (array_key_exists('$name', \$config)) {
43-
die(\$config['$name']);
53+
echo \$config['$name'];
54+
exit;
4455
}
4556
}
4657
"
@@ -118,14 +129,14 @@ checkInstanceReady() {
118129
local isInstalled=$(getConfigParamFromFile "isInstalled")
119130

120131
if [ -z "$isInstalled" ] || [ "$isInstalled" != 1 ]; then
121-
echo >&2 "Instance is not ready: waiting for the installation"
132+
echo >&2 "Instance is not ready: installation in progress"
122133
exit 0
123134
fi
124135

125136
local maintenanceMode=$(getConfigParamFromFile "maintenanceMode")
126137

127138
if [ -n "$maintenanceMode" ] && [ "$maintenanceMode" = 1 ]; then
128-
echo >&2 "Instance is not ready: waiting for the upgrade"
139+
echo >&2 "Instance is not ready: waiting for maintenance mode to be disabled"
129140
exit 0
130141
fi
131142

@@ -139,18 +150,19 @@ isDatabaseReady() {
139150
require_once('/var/www/html/bootstrap.php');
140151
141152
\$app = new \Espo\Core\Application();
142-
\$config = \$app->getContainer()->get('config');
143153
144-
\$helper = new \Espo\Core\Utils\Database\Helper(\$config);
154+
\$injectableFactory = \$app->getContainer()->get('injectableFactory');
155+
\$helper = \$injectableFactory->create('\\Espo\\Core\\Utils\\Database\\Helper');
145156
146157
try {
147-
\$helper->createPdoConnection();
158+
\$helper->createPDO();
148159
}
149160
catch (Exception \$e) {
150-
die(false);
161+
echo false;
162+
exit;
151163
}
152164
153-
die(true);
165+
echo true;
154166
"
155167
}
156168

@@ -163,11 +175,11 @@ verifyDatabaseReady() {
163175
return 0 #true
164176
fi
165177

166-
echo >&2 "Waiting Database for receiving connections..."
178+
echo >&2 "Waiting for database connection (attempt $i/40)..."
167179
sleep 3
168180
done
169181

170-
echo >&2 "error: Database is not available"
182+
echo >&2 "error: Database connection failed"
171183
return 1 #false
172184
}
173185

apache/docker-websocket.sh

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,30 @@ getConfigParamFromFile() {
2828
local name="$1"
2929

3030
php -r "
31+
if (file_exists('/var/www/html/data/state.php')) {
32+
\$config=include('/var/www/html/data/state.php');
33+
34+
if (array_key_exists('$name', \$config)) {
35+
echo \$config['$name'];
36+
exit;
37+
}
38+
}
39+
3140
if (file_exists('/var/www/html/data/config-internal.php')) {
3241
\$config=include('/var/www/html/data/config-internal.php');
3342
3443
if (array_key_exists('$name', \$config)) {
35-
die(\$config['$name']);
44+
echo \$config['$name'];
45+
exit;
3646
}
3747
}
3848
3949
if (file_exists('/var/www/html/data/config.php')) {
4050
\$config=include('/var/www/html/data/config.php');
4151
4252
if (array_key_exists('$name', \$config)) {
43-
die(\$config['$name']);
53+
echo \$config['$name'];
54+
exit;
4455
}
4556
}
4657
"
@@ -118,14 +129,14 @@ checkInstanceReady() {
118129
local isInstalled=$(getConfigParamFromFile "isInstalled")
119130

120131
if [ -z "$isInstalled" ] || [ "$isInstalled" != 1 ]; then
121-
echo >&2 "Instance is not ready: waiting for the installation"
132+
echo >&2 "Instance is not ready: installation in progress"
122133
exit 0
123134
fi
124135

125136
local maintenanceMode=$(getConfigParamFromFile "maintenanceMode")
126137

127138
if [ -n "$maintenanceMode" ] && [ "$maintenanceMode" = 1 ]; then
128-
echo >&2 "Instance is not ready: waiting for the upgrade"
139+
echo >&2 "Instance is not ready: waiting for maintenance mode to be disabled"
129140
exit 0
130141
fi
131142

@@ -139,18 +150,19 @@ isDatabaseReady() {
139150
require_once('/var/www/html/bootstrap.php');
140151
141152
\$app = new \Espo\Core\Application();
142-
\$config = \$app->getContainer()->get('config');
143153
144-
\$helper = new \Espo\Core\Utils\Database\Helper(\$config);
154+
\$injectableFactory = \$app->getContainer()->get('injectableFactory');
155+
\$helper = \$injectableFactory->create('\\Espo\\Core\\Utils\\Database\\Helper');
145156
146157
try {
147-
\$helper->createPdoConnection();
158+
\$helper->createPDO();
148159
}
149160
catch (Exception \$e) {
150-
die(false);
161+
echo false;
162+
exit;
151163
}
152164
153-
die(true);
165+
echo true;
154166
"
155167
}
156168

@@ -163,11 +175,11 @@ verifyDatabaseReady() {
163175
return 0 #true
164176
fi
165177

166-
echo >&2 "Waiting Database for receiving connections..."
178+
echo >&2 "Waiting for database connection (attempt $i/40)..."
167179
sleep 3
168180
done
169181

170-
echo >&2 "error: Database is not available"
182+
echo >&2 "error: Database connection failed"
171183
return 1 #false
172184
}
173185

fpm-alpine/Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM php:8.3-fpm-alpine
1+
FROM php:8.4-fpm-alpine
22

33
LABEL org.opencontainers.image.source=https://github.com/espocrm/espocrm
44
LABEL org.opencontainers.image.description="EspoCRM is an Open Source CRM. Try for Free."
@@ -69,16 +69,16 @@ RUN { \
6969
echo 'date.timezone=UTC'; \
7070
} > ${PHP_INI_DIR}/conf.d/espocrm.ini
7171

72-
ENV ESPOCRM_VERSION 9.2.7
73-
ENV ESPOCRM_SHA256 0156a51cda2225b8daa4b14fc288cb9c5336beb58c4b31de8d4d38eb8b8a33bd
72+
ENV ESPOCRM_VERSION 9.3.0
73+
ENV ESPOCRM_SHA256 021b15a4376e194f12273009ba6cd61f57fec685d6863ce64a3df412acc2f0b9
7474

7575
WORKDIR /var/www/html
7676

7777
RUN set -ex; \
78-
curl -fSL "https://www.espocrm.com/downloads/EspoCRM-9.2.7.zip" -o EspoCRM.zip; \
78+
curl -fSL "https://www.espocrm.com/downloads/EspoCRM-9.3.0.zip" -o EspoCRM.zip; \
7979
echo "${ESPOCRM_SHA256} *EspoCRM.zip" | sha256sum -c -; \
8080
unzip -q EspoCRM.zip -d /usr/src; \
81-
mv "/usr/src/EspoCRM-9.2.7" /usr/src/espocrm; \
81+
mv "/usr/src/EspoCRM-9.3.0" /usr/src/espocrm; \
8282
rm EspoCRM.zip
8383

8484
COPY ./docker-*.sh /usr/local/bin/

0 commit comments

Comments
 (0)