I was refactoring my .env today, and I had the sam...
# support-questions-legacy
k
I was refactoring my .env today, and I had the same error, but the cause was different. I noticed that: -
?schema
is not respected and has to be specified with
POSTGRESQL_TABLE_SCHEMA
compose's environment variable - environment variables seem to be not expanded, so a single interpolated string won't work. Here's a not working example:
Copy code
yaml
environment:
  - POSTGRESQL_CONNECTION_URI="postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}"
- environment variables from the .env file can still be safely used to provide values for all necessary compose's variables, but have to be used individually:
Copy code
yaml
environment:
  - POSTGRESQL_USER=${POSTGRES_USER}
  - POSTGRESQL_PASSWORD=${POSTGRES_PASSWORD}
  - POSTGRESQL_HOST=database
  - POSTGRESQL_PORT=${POSTGRES_PORT}
  - POSTGRESQL_DATABASE_NAME=${POSTGRES_DB}
  - POSTGRESQL_TABLE_SCHEMA=super_tokens