I tried to update passbolt (running in docker) by following the docker update tutorial
available here
However, after executing docker-compose down && docker-compose up -d
, it appears that Docker has created a new database instead of using the existing one, which contains all my data.
Is there a way to “link” it to the correct database?
I’m using traefik for HTTPS setup
This is my docker-compose.yml:
cat docker-compose.yml
version: "3.9"
services:
db:
image: mariadb:10.11
restart: unless-stopped
environment:
MYSQL_RANDOM_ROOT_PASSWORD: "true"
MYSQL_DATABASE: "passbolt"
MYSQL_USER: "passbolt"
MYSQL_PASSWORD: "P4ssb0lt"
volumes:
- database_volume:/var/lib/mysql
passbolt:
image: passbolt/passbolt:latest-ce
restart: unless-stopped
depends_on:
- db
environment:
APP_FULL_BASE_URL: "https://passbolt.mywebsite.com.br"
DATASOURCES_DEFAULT_HOST: "db"
DATASOURCES_DEFAULT_USERNAME: "passbolt"
DATASOURCES_DEFAULT_PASSWORD: "P4ssb0lt"
DATASOURCES_DEFAULT_DATABASE: "passbolt"
volumes:
- gpg_volume:/etc/passbolt/gpg
- jwt_volume:/etc/passbolt/jwt
labels:
- "traefik.enable=true"
- "traefik.http.routers.passbolt-https.rule=Host(`passbolt.mywebsite.com.br`)"
- "traefik.http.routers.passbolt-https.entrypoints=websecure"
- "traefik.http.routers.passbolt-https.tls=true"
- "traefik.http.routers.passbolt-https.tls.certresolver=letsencrypt"
- "traefik.http.services.passbolt-https.loadbalancer.server.port=80"
traefik:
image: traefik:2.6
restart: always
ports:
- "80:80"
- "443:443"
- "8080:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./traefik.yaml:/traefik.yaml:ro
- ./conf/:/etc/traefik/conf
- ./shared/:/shared
- ./logs:/logs
volumes:
database_volume:
gpg_volume:
jwt_volume:
This is traefik.yml
global:
sendAnonymousUsage: false
log:
level: DEBUG
format: common
accessLog:
filePath: "./logs/access.log"
bufferingSize: 100
providers:
docker:
endpoint: 'unix:///var/run/docker.sock'
watch: true
exposedByDefault: true
swarmMode: false
file:
directory: /etc/traefik/conf/
watch: true
api:
dashboard: true
debug: false
insecure: false
entryPoints:
web:
address: ':80'
http:
redirections:
entryPoint:
to: websecure
scheme: https
permanent: true
websecure:
address: ':443'
certificatesResolvers:
letsencrypt:
acme:
email: email@mycompany.com.br
storage: ./shared/acme.json
caServer: 'https://acme-v02.api.letsencrypt.org/directory'
keyType: EC256
httpChallenge:
entryPoint: web
tlsChallenge: {}
This is a printscreen of docker ps running on my server
I already tried inspecting the docker container which has the correct database setup and getting its ip address to put in place of DATASOURCES_DEFAULT_HOST but it didn’t work either.