Skip to content

Commit d37b627

Browse files
committed
Redis image tag from env and others docker stacks fixs
1 parent 5dd527d commit d37b627

File tree

3 files changed

+40
-7
lines changed

3 files changed

+40
-7
lines changed

.env

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
#
4343
# - "docker-compose.limits.yml" : defines containers cpu and memory limits for all Phraseanet and gateway containers only.
4444
#
45-
# - "docker-compose.altenatives.yml": all alternative services, used only on evoluation or transition periods
45+
# - "docker-compose.alternatives.yml": all alternative services, used only on evolution or transition or testing periods
4646
#
4747
# 2/ "COMPOSE_PROFILES" value define which profiles you want to use
4848
# in docker-compose.
@@ -279,7 +279,7 @@ RABBITMQ_MANAGEMENT_PORT=10811
279279
RABBITMQ_HOSTNAME=rabbit_phraseanet
280280

281281
# @run
282-
RABBITMQ_IMAGE_VERSION=rabbitmq:4.1.0-management
282+
RABBITMQ_IMAGE_TAG=rabbitmq:4.1.0-management
283283

284284
# --- Gateway settings (Nginx) -----------------------------------------------------------------------------------------
285285

@@ -580,6 +580,17 @@ DB_BACKUP_CRON_TIME=
580580
# @run
581581
DB_BACKUP_GZIP_LEVEL=9
582582

583+
# --- redis cache settings ---------------------------------------------------------------------------------------------
584+
585+
# Redis session Image Tag.
586+
# @run
587+
REDIS_CACHE_IMAGE_TAG=redis:8.0.1
588+
589+
# --- redis session settings ---------------------------------------------------------------------------------------------
590+
591+
# Redis cache Image Tag.
592+
# @run
593+
REDIS_SESSION_IMAGE_TAG=redis:8.0.1
583594

584595
# --- Pusher Settings ---
585596
# Phraseanet use the Pusher service to notify users of asynchronous downloads https://pusher.com.

docker-compose.altenatives.yml renamed to docker-compose.alternatives.yml

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,39 @@
11
services:
22

33
db:
4+
image: $PHRASEANET_DOCKER_REGISTRY/phraseanet-db:$PHRASEANET_DOCKER_TAG
5+
build: ./docker/db
6+
restart: on-failure
7+
profiles: ["db-volume-container"]
8+
environment:
9+
- MYSQL_ROOT_PASSWORD
10+
- MYSQL_MAX_ALLOWED_PACKET
11+
- MYSQL_MAX_CONNECTION
12+
- MYSQL_LONG_QUERY_TIME
13+
- MYSQL_SLOW_QUERY_LOG
14+
- MYSQL_QUERY_CACHE_LIMIT
15+
- MYSQL_QUERY_CACHE_SIZE
16+
- MYSQL_KEY_BUFFER_SIZE
17+
- MYSQL_CONNECT_TIMEOUT
18+
- MYSQL_WAIT_TIMEOUT
19+
- MARIADB_AUTO_UPGRADE
20+
volumes:
21+
- db_vol:/var/lib/mysql
22+
networks:
23+
- internal
24+
db-mysql8:
425
image: mysql:8.0.36-debian
526
# NOTE: use of "mysql_native_password" is not recommended: https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password
627
# (this is just an example, not intended to be a production configuration)
728
command: --default-authentication-plugin=mysql_native_password --max_allowed_packet=$MYSQL_MAX_ALLOWED_PACKET --max_connections=$MYSQL_MAX_CONNECTION --long_query_time=$MYSQL_LONG_QUERY_TIME --sql_mode="NO_ENGINE_SUBSTITUTION"
829
restart: on-failure
930
profiles: ["mysql8"]
1031
entrypoint:
11-
sh -c "
32+
sh -c \"
1233
echo 'CREATE DATABASE IF NOT EXISTS ab_master CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;CREATE DATABASE IF NOT EXISTS db_databox1 CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;CREATE DATABASE IF NOT EXISTS db_unitTest CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;CREATE DATABASE IF NOT EXISTS db_dataset1 CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;CREATE DATABASE IF NOT EXISTS db_dataset2 CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; CREATE USER `$PHRASEANET_DB_USER`@`%` IDENTIFIED BY \"$PHRASEANET_DB_PASSWORD\";GRANT ALL PRIVILEGES ON *.* to `$PHRASEANET_DB_USER`@`%`;' > /docker-entrypoint-initdb.d/init.sql;
1334
chmod +x /usr/local/bin/docker-entrypoint.sh /docker-entrypoint-initdb.d/init.sql;
1435
/usr/local/bin/docker-entrypoint.sh --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --default-authentication-plugin=mysql_native_password --max_allowed_packet=$MYSQL_MAX_ALLOWED_PACKET --max_connections=$MYSQL_MAX_CONNECTION --long_query_time=$MYSQL_LONG_QUERY_TIME --sql_mode="NO_ENGINE_SUBSTITUTION" --slow_query_log=$MYSQL_SLOW_QUERY_LOG
15-
"
36+
\"
1637
environment:
1738
- MYSQL_ROOT_PASSWORD
1839
- MYSQL_MAX_ALLOWED_PACKET
@@ -28,3 +49,4 @@ services:
2849
- ${PHRASEANET_DB_DIR}_mysql8:/var/lib/mysql:rw
2950
networks:
3051
- internal
52+

docker-compose.datastores.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ services:
2222
- internal
2323

2424
rabbitmq:
25-
image: $RABBITMQ_IMAGE_VERSION
25+
image: $RABBITMQ_IMAGE_TAG
2626
profiles: ["rabbitmq"]
2727
restart: on-failure
2828
hostname: $RABBITMQ_HOSTNAME
@@ -35,14 +35,14 @@ services:
3535
- internal
3636

3737
redis:
38-
image: redis
38+
image: $REDIS_CACHE_IMAGE_TAG
3939
profiles: ["redis"]
4040
restart: on-failure
4141
networks:
4242
- internal
4343

4444
redis-session:
45-
image: redis
45+
image: $REDIS_SESSION_IMAGE_TAG
4646
profiles: ["redis-session"]
4747
restart: on-failure
4848
networks:

0 commit comments

Comments
 (0)