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

  • Deployment Rails app for Docker
  • How to write a Dockerfile for a custom python project?
  • Docker instruction in Java Maven project to skip tests
  • Connecting to Kubernetes on Docker on OSX?
  • The right way to move a data-only docker container from one machine to another
  • Live reload Node.js dev environment with Docker
  • Container Based Application Clustering System
  • Unable to connect a dockerised keystone container with a dockerised mongo container
  • How to persist data using a postgres database, Docker, and Kubernetes?
  • Docker: Multiple MySQL instances/containers - second slave time out
  • Docker IIS Network Connection to External Network
  • ngx_http_userid module not generating $uid_got in running Docker container
  • 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.