Skip to content

Commit ef8ee67

Browse files
committed
♻️(compose) set compose name in the docker-compose file
The helper bin/compose was using the option -p to set the compose project name but this option is not used in the Makefile. This can lead to different way to use the docker compose file definition with different project name. In order to have a consistent name everywhere and for everybody, we set the name in the docker compose file itself.
1 parent ad47fc2 commit ef8ee67

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

bin/_config.sh

+1-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ UNSET_USER=0
77

88
TERRAFORM_DIRECTORY="./env.d/terraform"
99
COMPOSE_FILE="${REPO_DIR}/docker-compose.yml"
10-
COMPOSE_PROJECT="docs"
1110

1211

1312
# _set_user: set (or unset) default user id used to run docker commands
@@ -40,9 +39,8 @@ function _set_user() {
4039
# ARGS : docker compose command arguments
4140
function _docker_compose() {
4241

43-
echo "🐳(compose) project: '${COMPOSE_PROJECT}' file: '${COMPOSE_FILE}'"
42+
echo "🐳(compose) file: '${COMPOSE_FILE}'"
4443
docker compose \
45-
-p "${COMPOSE_PROJECT}" \
4644
-f "${COMPOSE_FILE}" \
4745
--project-directory "${REPO_DIR}" \
4846
"$@"

docker-compose.yml

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
name: docs
2+
13
services:
24
postgresql:
35
image: postgres:16

0 commit comments

Comments
 (0)