Skip to content

Commit da54476

Browse files
committed
docker compose files reorganisation
1 parent e33f71e commit da54476

File tree

4 files changed

+33
-25
lines changed

4 files changed

+33
-25
lines changed

.dockerignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,6 @@
3838
/www/thumbnails
3939
/www/.htaccess
4040
npm-debug.log
41-
stack_management.sh
41+
stack.sh
42+
/.vagrant
43+

.env

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,9 @@
6060
# choose to launch only some workers, see worker profile list below.
6161
# - "worker" : launch one container worker with all jobs run on it.
6262
# - "cmd" : launch a container based on worker image, useful for run cmd manualy.
63-
# - "db" : db profile will launch a mariadb container,
63+
# - "db" : db profile will launch a mariadb container, with data stored on host and mounted in the db container.
6464
# because this is the primary datastore, you should use you own SGDD service for production needs.
65+
# - "db-docker-vol" : same as "db" profile but with data stored in a docker volume.
6566
# - "elastisearch" : launch a elasticsearch container.
6667
# - "rabbitmq" : launch a rabbitmq container.
6768
# - "redis" : launch a redis container for app cache.

docker-compose.alternatives.yml

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,4 @@
11
services:
2-
3-
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
242
db-mysql8:
253
image: mysql:8.0.36-debian
264
# 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
@@ -51,4 +29,5 @@ services:
5129
internal:
5230
aliases:
5331
- db
32+
5433

docker-compose.datastores.yml

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,33 @@ services:
1919
volumes:
2020
- ${PHRASEANET_DB_DIR}:/var/lib/mysql
2121
networks:
22-
- internal
22+
internal:
23+
aliases:
24+
- db
25+
26+
db-docker-vol:
27+
image: $PHRASEANET_DOCKER_REGISTRY/phraseanet-db:$PHRASEANET_DOCKER_TAG
28+
build: ./docker/db
29+
restart: on-failure
30+
profiles: ["db-docker-vol"]
31+
environment:
32+
- MYSQL_ROOT_PASSWORD
33+
- MYSQL_MAX_ALLOWED_PACKET
34+
- MYSQL_MAX_CONNECTION
35+
- MYSQL_LONG_QUERY_TIME
36+
- MYSQL_SLOW_QUERY_LOG
37+
- MYSQL_QUERY_CACHE_LIMIT
38+
- MYSQL_QUERY_CACHE_SIZE
39+
- MYSQL_KEY_BUFFER_SIZE
40+
- MYSQL_CONNECT_TIMEOUT
41+
- MYSQL_WAIT_TIMEOUT
42+
- MARIADB_AUTO_UPGRADE
43+
volumes:
44+
- db_vol:/var/lib/mysql
45+
networks:
46+
internal:
47+
aliases:
48+
- db
2349

2450
rabbitmq:
2551
image: $RABBITMQ_IMAGE_TAG

0 commit comments

Comments
 (0)