Skip to content

Commit

Permalink
🔧(cookiecutter) fix incompatibility with docker compose v2
Browse files Browse the repository at this point in the history
`discovery.type=single-node` was declared through `env.d/development` but since
docker compose v2, this variable is not well parsed so a syntax error occurres.
To fix it, we could declare this environment variable within `docker-compose
.yml`.We also remove duplicated `user` property.

Fix openfun#1698
  • Loading branch information
jbpenrath committed Jun 27, 2022
1 parent 83cd324 commit 9d99ac4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ services:

elasticsearch:
image: fundocker/openshift-elasticsearch:6.6.2
environment:
- discovery.type=single-node
env_file:
- "env.d/development"
ports:
Expand Down Expand Up @@ -98,31 +100,29 @@ services:
node:
image: node:16.15
working_dir: /app/src/frontend
user: "${DOCKER_USER:-1000}"
user: ${DOCKER_USER:-1000}
volumes:
- ./sites/${RICHIE_SITE:-funmooc}:/app

terraform-state:
image: hashicorp/terraform:latest
env_file: env.d/aws
user: "${DOCKER_USER:-1000}"
user: ${DOCKER_USER:-1000}
working_dir: /app
volumes:
- ./aws/create_state_bucket:/app
user: ${DOCKER_USER:-1000}

terraform:
image: hashicorp/terraform:0.12.31
environment:
- TF_VAR_SITE=${RICHIE_SITE:-funmooc}
- TF_DATA_DIR=/config
env_file: env.d/aws
user: "${DOCKER_USER:-1000}"
user: ${DOCKER_USER:-1000}
working_dir: /app
volumes:
- ./aws:/app
- ./sites/${RICHIE_SITE:-funmooc}/aws:/config
user: ${DOCKER_USER:-1000}

redis-sentinel:
image: docker.io/bitnami/redis-sentinel:6.0-debian-10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ DJANGO_ALLOWED_HOSTS=*

# Elastic search
RICHIE_ES_HOST=elasticsearch
discovery.type=single-node

# PostgreSQL db container configuration
POSTGRES_DB=richie
Expand Down

0 comments on commit 9d99ac4

Please sign in to comment.