Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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) -----------------------------------------------------------------------------------------

Expand Down Expand Up @@ -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.
Expand Down
32 changes: 28 additions & 4 deletions docker-compose.altenatives.yml → docker-compose.alternatives.yml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -27,4 +48,7 @@ services:
volumes:
- ${PHRASEANET_DB_DIR}_mysql8:/var/lib/mysql:rw
networks:
- internal
internal:
aliases:
- db

6 changes: 3 additions & 3 deletions docker-compose.datastores.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ services:
- internal

rabbitmq:
image: $RABBITMQ_IMAGE_VERSION
image: $RABBITMQ_IMAGE_TAG
profiles: ["rabbitmq"]
restart: on-failure
hostname: $RABBITMQ_HOSTNAME
Expand All @@ -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:
Expand Down
2 changes: 0 additions & 2 deletions docker-compose.tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ services:
restart: on-failure
ports:
- ${PHRASEANET_PHPMYADMIN_PORT}:80
depends_on:
- db
networks:
- internal

Expand Down
Loading