I’m encountering a similar issue, but it doesn’t have anything to do with an update. This is a newly installed, online production instance. I’ve gone as far as creating my first (admin) user, confirmed email, and can login, logout, and login again.
If I run:
docker-compose down
docker-compose up -d
then I have to start all over at the beginning again. The previously created user cannot login, and I have to setup the initial user and confirm the email address again. After that, I can login, logout, etc… until I take the container down again.
My guess is that I’ve done something wrong when setting up the file structure and permissions. The DevOps Guide states:
Make sure to change the owner to the Docker container (you can use chown 1001:1001 data/db
and chown 4242:4242 data/server
). Omit if you won’t use persistent storage.
I created that structure and changed owners of those two directories before starting the container the first time. But I wasn’t sure which user should be the owner of the “data” folder that is the parent of “db” and “server”. Right now, it is my logged in Ubuntu user.
With the container running, the “db” folder is empty, and the “server” folder contains a “compose” folder and a “system” folder. Both owned by root:root and both empty.
Somehow it seems my database and possibly other things (I’ve not tried to upload any files) are not persistent.
Here is my docker-compose.yaml file:
version: '3.5'
services:
server:
image: cortezaproject/corteza:${VERSION}
networks: [ proxy, internal ]
restart: always
env_file: [ .env ]
depends_on:
db:
condition: service_healthy
volumes: [ "./data/server:/data" ]
environment:
# VIRTUAL_HOST helps NginX proxy route traffic for specific virtual host to
# this container
# This value is also picked up by initial boot auto-configuration procedure
# If this is changed, make sure you change settings accordingly
VIRTUAL_HOST: ${DOMAIN}
# This is needed only if you are using NginX Lets-Encrypt companion
# (see docs.cortezaproject.org for details)
LETSENCRYPT_HOST: ${DOMAIN}
db:
# PostgreSQL Database
# See https://hub.docker.com/_/postgres for details
# Support for postgres 13, 14 and 15 is available in the latest version of Corteza
image: postgres:15
networks: [ internal ]
restart: always
healthcheck: { test: ["CMD-SHELL", "pg_isready -U corteza"], interval: 10s, timeout: 5s, retries: 5 }
environment:
# Warning: these are values that are only used on 1st start
# if you want to change it later, you need to do that
# manually inside db container
POSTGRES_USER: corteza
POSTGRES_PASSWORD: corteza
networks:
internal: {}
proxy: { external: true }
and here is my directory listing starting from /home:
Owners are in [brackets ]
[root ] .
└── [myuser ] ./myuser
├── [myuser ] ./myuser/corteza-production
│ └── [myuser ] ./myuser/corteza-production/data
│ ├── [1001 ] ./myuser/corteza-production/data/db
│ └── [4242 ] ./myuser/corteza-production/data/server
│ ├── [root ] ./myuser/corteza-production/data/server/compose
│ └── [root ] ./myuser/corteza-production/data/server/system
└── [myuser ] ./myuser/nginx
├── [root ] ./myuser/nginx/certs
│ └── [root ] ./myuser/nginx/certs/my.domain.net
├── [root ] ./myuser/nginx/html
├── [root ] ./myuser/nginx/htpasswd
└── [root ] ./myuser/nginx/vhost.d
Thanks for any guidance!