Hi community,
This is part of my dspace db service configuration.
deploy:
labels:
- "traefik.enable=true"
- "traefik.tcp.routers.dspacedb.entrypoints=postgres"
- "traefik.tcp.routers.dspacedb.rule=HostSNI(`*`)"
- "traefik.tcp.routers.dspacedb.tls=false"
- "traefik.tcp.routers.dspacedb.service=dspacedb"
- "traefik.tcp.services.dspacedb.loadbalancer.server.port=5432
Now I want to establish a jdbc connection using an environment variable as in this example:
# This is an example of use in a configuration without traefik.
db__P__url: 'jdbc:postgresql://dspacedb:5432/dspace'
How should I modify my url so that the connection is made if I use traefik?
Should I use the ip address of my dspace db service provided by traefik-net instead of the container name?
Thanks for your help.