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