Skip to content

Commit 16b5375

Browse files
Fixing docker build. Increase versions of all images.
1 parent 3c804a3 commit 16b5375

8 files changed

+34
-24
lines changed

Dockerfile

+5-6
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44

55

66
# https://docs.docker.com/engine/reference/builder/#understand-how-arg-and-from-interact
7-
ARG PHP_VERSION=7.4.28
8-
ARG NGINX_VERSION=1.17
7+
ARG PHP_VERSION=8.3
8+
ARG NGINX_VERSION=1.27.3
99

1010

1111
# "php" stage
12-
FROM php:${PHP_VERSION}-fpm-alpine3.15 AS bewelcome_php
12+
FROM php:${PHP_VERSION}-fpm-alpine3.21 AS bewelcome_php
1313

1414
# persistent / runtime deps
1515
RUN apk add --no-cache \
@@ -25,7 +25,7 @@ RUN apk add --no-cache \
2525
python3 \
2626
;
2727

28-
ARG APCU_VERSION=5.1.18
28+
ARG APCU_VERSION=5.1.24
2929
RUN set -eux; \
3030
apk add --no-cache --virtual .build-deps \
3131
$PHPIZE_DEPS \
@@ -46,7 +46,6 @@ RUN set -eux; \
4646
mysqli \
4747
pcntl \
4848
pdo_mysql \
49-
xmlrpc \
5049
xsl \
5150
zip \
5251
exif \
@@ -126,7 +125,7 @@ RUN set -eux; \
126125
composer clear-cache
127126

128127
# prevent the reinstallation of node_modules at every changes in the source code
129-
COPY package.json yarn.lock webpack.config.js postcss.config.js tailwind.config.js ./
128+
COPY package.json yarn.lock webpack.config.js postcss.config.js tailwind.config.js tsconfig.json ./
130129
RUN set -eux; \
131130
yarn install --frozen-lock; \
132131
yarn encore production --mode=production

Makefile

+6-7
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,12 @@ phpci: phpcpd phploc phpmd php-code-sniffer phpunit infection behat version
1717
install:
1818
git rev-parse --short HEAD > VERSION
1919
test -f docker-compose.override.yml || cp docker-compose.override.yml.dist docker-compose.override.yml
20-
curl https://downloads.bewelcome.org/for_developers/rox_test_db/languages.sql.bz2 -o ./docker/db/languages.sql.bz2
21-
curl https://downloads.bewelcome.org/for_developers/rox_test_db/words.sql.bz2 -o ./docker/db/words.sql.bz2
22-
bunzip2 --force ./docker/db/languages.sql.bz2 ./docker/db/words.sql.bz2
20+
bzip2 -ckd docker/languages.sql.bz2 > docker/db/languages.sql
21+
bzip2 -ckd docker/words.sql.bz2 > docker/db/words.sql
2322
ifdef root
24-
sudo docker-compose up -d
23+
sudo docker compose up -d
2524
else
26-
docker-compose up -d
25+
docker compose up -d
2726
endif
2827

2928
install-geonames:
@@ -34,9 +33,9 @@ install-geonames:
3433
unzip docker/db/alternateNames.zip -d docker/db/
3534
rm docker/db/*.zip
3635
ifdef root
37-
sudo docker-compose exec php sh -c "mysql bewelcome -u bewelcome -pbewelcome -h db < import.sql"
36+
sudo docker compose exec php sh -c "mysql bewelcome -u bewelcome -pbewelcome -h db < import.sql"
3837
else
39-
docker-compose exec php sh -c "mysql bewelcome -u bewelcome -pbewelcome -h db < import.sql"
38+
docker compose exec php sh -c "mysql bewelcome -u bewelcome -pbewelcome -h db < import.sql"
4039
endif
4140

4241
phpcsfix:

docker-compose.override.yml.dist

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
version: '3.4'
2-
31
services:
42
web:
53
ports:

docker-compose.yml

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
version: '3.4'
2-
31
x-cache-from:
42
- &cache-from
53
cache_from:
@@ -41,7 +39,7 @@ services:
4139
- ./public:/srv/bewelcome/public:ro
4240

4341
db:
44-
image: mariadb:10.1.41
42+
image: mariadb:11.6.2
4543
environment:
4644
MYSQL_ROOT_PASSWORD: bewelcome_root_dev
4745
MYSQL_DATABASE: bewelcome
@@ -52,7 +50,7 @@ services:
5250

5351
manticore:
5452
container_name: manticore
55-
image: manticoresearch/manticore:5.0.2
53+
image: manticoresearch/manticore:6.3.8
5654
environment:
5755
- EXTRA=1
5856
restart: always

docker/languages.sql.bz2

7.53 KB
Binary file not shown.

docker/php/docker-entrypoint.sh

+16-4
Original file line numberDiff line numberDiff line change
@@ -52,32 +52,44 @@ if [ "$1" = 'php-fpm' ] || [ "$1" = 'php' ] || [ "$1" = 'bin/console' ]; then
5252
sleep 1
5353
done
5454

55+
echo "db ready!"
5556
if [ "$APP_ENV" != 'prod' ]; then
57+
echo "Creating database..."
5658
bin/console test:database:create --drop --force --no-interaction
59+
echo "Database created."
60+
5761
database_host=$(grep '^DB_HOST=' .env | cut -f 2 -d '=')
5862
database_port=$(grep '^DB_PORT=' .env | cut -f 2 -d '=')
5963
database_name=$(grep '^DB_NAME=' .env | cut -f 2 -d '=')
6064
database_user=$(grep '^DB_USER=' .env | cut -f 2 -d '=')
6165
database_password=$(grep '^DB_PASS=' .env | cut -f 2 -d '=')
66+
echo "$database_name"
67+
echo "$database_port"
68+
echo "$database_user"
69+
echo "$database_password"
6270
if [ -f docker/db/languages.sql ]; then
63-
mysql $database_name -u $database_user -p$database_password -h $database_host < docker/db/languages.sql
71+
mariadb $database_name -u $database_user -p$database_password -h $database_host < docker/db/languages.sql
6472
fi
6573
if [ -f docker/db/words.sql ]; then
66-
mysql $database_name -u $database_user -p$database_password -h $database_host < docker/db/words.sql
74+
mariadb $database_name -u $database_user -p$database_password -h $database_host < docker/db/words.sql
6775
fi
6876
if [ -f docker/db/geonamesadminunits.sql ]; then
69-
mysql $database_name -u $database_user -p$database_password -h $database_host < docker/db/geonamesadminunits.sql
77+
mariadb $database_name -u $database_user -p$database_password -h $database_host < docker/db/geonamesadminunits.sql
7078
fi
79+
echo "Database updated!"
7180
elif ls -A src/Migrations/*.php > /dev/null 2>&1; then
81+
echo "migration"
7282
bin/console doctrine:migrations:migrate --no-interaction
7383
fi
74-
84+
echo "warmup"
7585
# WarmUp translations now database is up to date
7686
composer run-script --no-dev post-install-cmd
7787

7888
if [ "$APP_ENV" != 'prod' ]; then
89+
echo "yarn"
7990
yarn encore dev --mode=development
8091
fi
8192
fi
93+
echo "docker-php"
8294

8395
exec docker-php-entrypoint "$@"

docker/words.sql.bz2

4.34 MB
Binary file not shown.

tsconfig.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
{}
1+
{
2+
"files": [
3+
"assets/js/admin/tools/login_message.ts"
4+
]
5+
}

0 commit comments

Comments
 (0)