Lucee Datasource not persisting in Docker

I know this is a Docker problem, but I couldn’t find the solution on the Docker community.
I created a Lucee/Postgres/PgAdmin set with docker-compose.
It all comes up, I created the database, tables, set the datasource on Lucee, but when I shut it down (docker-compose down) and bring it up again (docker-compose up), the database and tables are there, but Lucee loses all datasources.
Could anybody help me ? Maybe I’m missing something in my docker-compose.yml or should I add some datasource info on Application.cfc other than this.datasource = … ?
Thanks for your help.
Here is my yml file:
services:
postgres:
container_name: postgres
restart: always
image: postgres:latest
environment:
POSTGRES_DB: postgres
POSTGRES_USER: root
POSTGRES_PASSWORD: password
volumes:
- ./postgres-data:/var/lib/postgresql/data
ports:
- 5432:5432
expose:
- 5432

pgadmin:
image: dpage/pgadmin4
restart: always
environment:
PGADMIN_DEFAULT_EMAIL: “rparente@cfdevelopers.net
PGADMIN_DEFAULT_PASSWORD: “flamingo277”
PGADMIN_LISTEN_PORT: “80”
ports:
- 8080:80
depends_on:
- postgres
volumes:
- ./pgadmin-data:/var/lib/pgadmin

lucee:
container_name: lucee
image: lucee/lucee
volumes:
- ./www:/var/www
- ./password.txt:/opt/lucee/server/lucee-server/context/password.txt
ports:
- 4040:8888
depends_on:
- postgres

volumes:
postgres-data:
name: postgres-data
pgadmin-data:
name: pgadmin-data

Don’t forget to tell us about your stack!

OS: Mac Mojave 10.14.6
Java Version: version 8 update 271 build 1.8.0_271-b09
Tomcat Version: ???
Lucee Version: Latest

If you define your datasource in your Application.cfc, it should work even when the container is rebuilt. You won’t see the datasource in the Lucee admin UI, but you will be able to use it. Your code should look something like the last example at https://docs.lucee.org/guides/cookbooks/datasource-define-datasource.html (but for postgresql, of course).

Thank you Sbleon,
I added the code from Lucee’s Datasource screen to Application.cfc and everything is good now. It works !
Thank you so much !

this.datasources[“parentedb”] = {
class: ‘org.postgresql.Driver’
, bundleName: ‘org.postgresql.jdbc42’
, bundleVersion: ‘9.4.1212’
, connectionString: ‘jdbc:postgresql://postgres:5432/parente’
, username: ‘rparente’
, password: “encrypted:…”
// optional settings
, blob:true // default: false
, clob:true // default: false
, connectionLimit:100 // default:-1
, validate:false // default: false
};