I believe that the latest tag is being retained for actual release versions. Everything at the moment, as far as the server software is concerned, is a beta.
Does your server retain your database data if you take the containers down and change the server image in the compose file before running it again?
volumes:
- /YOUR_PATH/joplin-data:/YOUR_PATH/postgresql/data
I ask as I thought that the "volumes" format was mapping a folder outside the container : to one inside it:
So wouldn't the second half of that volumes statement have to be :/var/lib/postgresql/data
?
I am still trying to get my head around docker!!!
The second part is not right because there's no "YOU_PATH" in there since it's a static path - this should be the path within the Docker volume basically.
I have it set this way:
version: '3'
services:
db:
image: postgres:13.1
volumes:
- ./data/postgres:/var/lib/postgresql/data
ports:
- "5432:5432"
restart: unless-stopped
environment:
- APP_PORT=22300
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_DB=${POSTGRES_DATABASE}
app:
image: joplin/server:2.2.1-beta
depends_on:
- db
ports:
- "22300:22300"
restart: unless-stopped
environment:
- APP_BASE_URL=${APP_BASE_URL}
- DB_CLIENT=pg
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DATABASE=${POSTGRES_DATABASE}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PORT=${POSTGRES_PORT}
- POSTGRES_HOST=db
With this setup the Postgres data is in a "data" folder relative to the docker-compose file. I also have a ".env" with the config in there so basically all the server is contained with a single folder with the following files:
.env
data/
docker-compose.yml
Thanks for clarifying.
That's why I asked @KajWiik because if they have used anything other than /var/lib/postgresql/data
on the right hand of that volume statement they will not be mapping their data folder outside the container and so their data will not persist?
Hmm, that's correct of course, now I see it. My goal was to put the data to a raid partition but the correct choice would have been to put everything there.
I guess there is no way to change this without losing all data (and resync)...?
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.