How can I Enable Unaccent for postgres in Docker-Compose?

I need to enable the accents for postgreSQL. This is my docker-compose.yml, but it doesn’t work. Any tips? Thank you.

db:
  image: postgres
  ports:
    - 5432
  environment:
    DB_UNACCENT: true
mailcatcher:
  image: aboutsource/mailcatcher
  ports:
    - "1080:1080"
web:
  build: .
  command: passenger start --port 3000
  volumes:
    - .:/myapp
  environment:
   - RAILS_ENV=development
  ports:
    - "3000:3000"
    - "25:25"
    - "587:587"
  links:
    - db
    - mailcatcher

  • How to config my nginx to a running container with rails using raspian?
  • database and collections created in docker container cant be found in committed docker image
  • Installing opencv in docker container
  • Deploying multicontainer docker environment (flask & nginx) with EBS
  • If I run sudo apt-get update inside docker image and run it as a container, do I still need to sudo apt-get update on the machine too?
  • Committing an interactive container in docker
  • Docker procedure - treat local copy as staging server?
  • How can I deal with security updates in my docker containers?
  • Using a multidomain certificate for artifactory dokcer repo
  • How is the ID from the docker info generated and how stable is it?
  • Docker-compose depend_on
  • Copying a once compiled folder from shared drive into own workspace in a docker image
  • One Solution collect form web for “How can I Enable Unaccent for postgres in Docker-Compose?”

    See my previous answer on that topic How to set the locale inside a Docker container?

    Adapt it with the correct locale for your need.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.