mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-07 18:14:35 +00:00
PHRAS-4156 Redis image tag from env and others docker stacks fix (#4608)
* Redis image tag from env and lock redis version * add aliase "db" on db-mysql8 service * remove db depend for pma * renaming mysql8 profil to db-mysql8
This commit is contained in:
17
.env
17
.env
@@ -42,7 +42,7 @@
|
||||
#
|
||||
# - "docker-compose.limits.yml" : defines containers cpu and memory limits for all Phraseanet and gateway containers only.
|
||||
#
|
||||
# - "docker-compose.altenatives.yml": all alternative services, used only on evoluation or transition periods
|
||||
# - "docker-compose.alternatives.yml": all alternative services, used only on evolution or transition or testing periods
|
||||
#
|
||||
# 2/ "COMPOSE_PROFILES" value define which profiles you want to use
|
||||
# in docker-compose.
|
||||
@@ -72,7 +72,7 @@
|
||||
# - "mailhog" : for catching all email emit by app for dev and testing.
|
||||
# - "db-backup" : launch and run a container to cron database backups and backup file's rotation.
|
||||
# - "pma" : launch a phpmyadmin container for test and dev purpose.
|
||||
# - "mysql8" : launch a mysql8 container (beta), (/!\ do not mix with the "db" profile)
|
||||
# - "db-mysql8" : launch a mysql8 container (beta), (/!\ do not mix with the "db" profile)
|
||||
# Because this is the primary datastore, you should use you own SGDD service for production needs.
|
||||
#
|
||||
# Profiles worker list:
|
||||
@@ -279,7 +279,7 @@ RABBITMQ_MANAGEMENT_PORT=10811
|
||||
RABBITMQ_HOSTNAME=rabbit_phraseanet
|
||||
|
||||
# @run
|
||||
RABBITMQ_IMAGE_VERSION=rabbitmq:4.1.0-management
|
||||
RABBITMQ_IMAGE_TAG=rabbitmq:4.1.0-management
|
||||
|
||||
# --- Gateway settings (Nginx) -----------------------------------------------------------------------------------------
|
||||
|
||||
@@ -580,6 +580,17 @@ DB_BACKUP_CRON_TIME=
|
||||
# @run
|
||||
DB_BACKUP_GZIP_LEVEL=9
|
||||
|
||||
# --- redis cache settings ---------------------------------------------------------------------------------------------
|
||||
|
||||
# Redis session Image Tag.
|
||||
# @run
|
||||
REDIS_CACHE_IMAGE_TAG=redis:8.0.1
|
||||
|
||||
# --- redis session settings ---------------------------------------------------------------------------------------------
|
||||
|
||||
# Redis cache Image Tag.
|
||||
# @run
|
||||
REDIS_SESSION_IMAGE_TAG=redis:8.0.1
|
||||
|
||||
# --- Pusher Settings ---
|
||||
# Phraseanet use the Pusher service to notify users of asynchronous downloads https://pusher.com.
|
||||
|
@@ -1,18 +1,39 @@
|
||||
services:
|
||||
|
||||
db:
|
||||
image: $PHRASEANET_DOCKER_REGISTRY/phraseanet-db:$PHRASEANET_DOCKER_TAG
|
||||
build: ./docker/db
|
||||
restart: on-failure
|
||||
profiles: ["db-volume-container"]
|
||||
environment:
|
||||
- MYSQL_ROOT_PASSWORD
|
||||
- MYSQL_MAX_ALLOWED_PACKET
|
||||
- MYSQL_MAX_CONNECTION
|
||||
- MYSQL_LONG_QUERY_TIME
|
||||
- MYSQL_SLOW_QUERY_LOG
|
||||
- MYSQL_QUERY_CACHE_LIMIT
|
||||
- MYSQL_QUERY_CACHE_SIZE
|
||||
- MYSQL_KEY_BUFFER_SIZE
|
||||
- MYSQL_CONNECT_TIMEOUT
|
||||
- MYSQL_WAIT_TIMEOUT
|
||||
- MARIADB_AUTO_UPGRADE
|
||||
volumes:
|
||||
- db_vol:/var/lib/mysql
|
||||
networks:
|
||||
- internal
|
||||
db-mysql8:
|
||||
image: mysql:8.0.36-debian
|
||||
# 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
|
||||
# (this is just an example, not intended to be a production configuration)
|
||||
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"
|
||||
restart: on-failure
|
||||
profiles: ["mysql8"]
|
||||
profiles: ["db-mysql8"]
|
||||
entrypoint:
|
||||
sh -c "
|
||||
sh -c \"
|
||||
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;
|
||||
chmod +x /usr/local/bin/docker-entrypoint.sh /docker-entrypoint-initdb.d/init.sql;
|
||||
/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
|
||||
"
|
||||
\"
|
||||
environment:
|
||||
- MYSQL_ROOT_PASSWORD
|
||||
- MYSQL_MAX_ALLOWED_PACKET
|
||||
@@ -27,4 +48,7 @@ services:
|
||||
volumes:
|
||||
- ${PHRASEANET_DB_DIR}_mysql8:/var/lib/mysql:rw
|
||||
networks:
|
||||
- internal
|
||||
internal:
|
||||
aliases:
|
||||
- db
|
||||
|
@@ -22,7 +22,7 @@ services:
|
||||
- internal
|
||||
|
||||
rabbitmq:
|
||||
image: $RABBITMQ_IMAGE_VERSION
|
||||
image: $RABBITMQ_IMAGE_TAG
|
||||
profiles: ["rabbitmq"]
|
||||
restart: on-failure
|
||||
hostname: $RABBITMQ_HOSTNAME
|
||||
@@ -35,14 +35,14 @@ services:
|
||||
- internal
|
||||
|
||||
redis:
|
||||
image: redis
|
||||
image: $REDIS_CACHE_IMAGE_TAG
|
||||
profiles: ["redis"]
|
||||
restart: on-failure
|
||||
networks:
|
||||
- internal
|
||||
|
||||
redis-session:
|
||||
image: redis
|
||||
image: $REDIS_SESSION_IMAGE_TAG
|
||||
profiles: ["redis-session"]
|
||||
restart: on-failure
|
||||
networks:
|
||||
|
@@ -28,8 +28,6 @@ services:
|
||||
restart: on-failure
|
||||
ports:
|
||||
- ${PHRASEANET_PHPMYADMIN_PORT}:80
|
||||
depends_on:
|
||||
- db
|
||||
networks:
|
||||
- internal
|
||||
|
||||
|
Reference in New Issue
Block a user