Update from 0.3.2

Hello, I have a docker install in version 0.3.2. What are the right steps to update the system to the last version?
54 Replies
charles
charles5mo ago
Hi @iero! Hope you are doing well For now, we recommend migrating step by step: - 0.3.2 > 0.3.3 > 0.4.0 > 0.10.0 However, I can assist you and go directly to 0.10.0 if you like You'll experience some downtime though First, update your containers to use v0.10.0
greg [iero]
greg [iero]5mo ago
Yes it will be good to go directly to 0.10.0 I will backup first
charles
charles5mo ago
ok!
greg [iero]
greg [iero]5mo ago
Could you confirm that I'm OK with this dump? Nothing more to backup?
pg_dump -U twenty -h localhost -p 5432 -Fc default > db_twenty.dump
pg_dump -U twenty -h localhost -p 5432 -Fc default > db_twenty.dump
charles
charles5mo ago
I'm doing: pg_dump postgres://user:password@domain:5432/default > 04-22-2024.sql so it looks good, not sure about -Fc options and what they do
greg [iero]
greg [iero]5mo ago
Ok done both to be sure:
iero@endor ~/Twenty/backup % ls -hl total 2272
-rw-r--r-- 1 iero staff 337K Apr 24 14:15 db_240424.dump
-rw-r--r-- 1 iero staff 749K Apr 24 14:16 db_240424.sql
iero@endor ~/Twenty/backup % ls -hl total 2272
-rw-r--r-- 1 iero staff 337K Apr 24 14:15 db_240424.dump
-rw-r--r-- 1 iero staff 749K Apr 24 14:16 db_240424.sql
I remove containers and update to last version ?
charles
charles5mo ago
keep your database instance, are you using a persistent storage? you should only update the container images but keep the data (even if you have made a dump)
greg [iero]
greg [iero]5mo ago
I have the three containers:
iero@endor ~/Twenty/backup % docker-compose ps [14:32:11]
WARN[0000] /Users/iero/Twenty/compose.yaml: `version` is obsolete
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
twenty-twenty-back-1 twentycrm/twenty-server:latest "docker-entrypoint.s…" twenty-back 6 weeks ago Up 41 hours 0.0.0.0:3000->3000/tcp
twenty-twenty-db-1 twentycrm/twenty-postgres:latest "/opt/bitnami/script…" twenty-db 6 weeks ago Up 41 hours 0.0.0.0:5432->5432/tcp
twenty-twenty-front-1 twentycrm/twenty-front:latest "docker-entrypoint.s…" twenty-front 4 weeks ago Up 41 hours 0.0.0.0:3001->3000/tcp
iero@endor ~/Twenty/backup % docker-compose ps [14:32:11]
WARN[0000] /Users/iero/Twenty/compose.yaml: `version` is obsolete
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
twenty-twenty-back-1 twentycrm/twenty-server:latest "docker-entrypoint.s…" twenty-back 6 weeks ago Up 41 hours 0.0.0.0:3000->3000/tcp
twenty-twenty-db-1 twentycrm/twenty-postgres:latest "/opt/bitnami/script…" twenty-db 6 weeks ago Up 41 hours 0.0.0.0:5432->5432/tcp
twenty-twenty-front-1 twentycrm/twenty-front:latest "docker-entrypoint.s…" twenty-front 4 weeks ago Up 41 hours 0.0.0.0:3001->3000/tcp
The database is in a docker container I might test in a test environment to be sure 🙂
charles
charles5mo ago
could you share your docker-compose.yaml (or compose.yaml)
greg [iero]
greg [iero]5mo ago
sure:
version: "3.9"
services:

twenty-front:
image: twentycrm/twenty-front:${TAG}
ports:
- 3001:3000
environment:
- SIGN_IN_PREFILLED=${SIGN_IN_PREFILLED}
- REACT_APP_SERVER_BASE_URL=${LOCAL_SERVER_URL}
- REACT_APP_SERVER_AUTH_URL=${LOCAL_SERVER_URL}/auth
- REACT_APP_SERVER_FILES_URL=${LOCAL_SERVER_URL}/files
depends_on:
- twenty-back

twenty-back:
image: twentycrm/twenty-server:${TAG}
ports:
- 3000:3000
environment:
- SIGN_IN_PREFILLED=${SIGN_IN_PREFILLED}
- PG_DATABASE_URL=${PG_DATABASE_URL}
- FRONT_BASE_URL=${FRONT_BASE_URL}
- PORT=3000
- STORAGE_TYPE=local
- STORAGE_LOCAL_PATH=.local-storage
- ACCESS_TOKEN_SECRET=${ACCESS_TOKEN_SECRET}
- LOGIN_TOKEN_SECRET=${LOGIN_TOKEN_SECRET}
- REFRESH_TOKEN_SECRET=${REFRESH_TOKEN_SECRET}
depends_on:
- twenty-db

twenty-db:
image: twentycrm/twenty-postgres:${TAG}
volumes:
- twenty-db-data:/bitnami/postgresql
ports:
- 5432:5432
environment:
- POSTGRESQL_USER=${POSTGRES_USER}
- POSTGRESQL_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRESQL_DB=default

volumes:
twenty-db-data:
version: "3.9"
services:

twenty-front:
image: twentycrm/twenty-front:${TAG}
ports:
- 3001:3000
environment:
- SIGN_IN_PREFILLED=${SIGN_IN_PREFILLED}
- REACT_APP_SERVER_BASE_URL=${LOCAL_SERVER_URL}
- REACT_APP_SERVER_AUTH_URL=${LOCAL_SERVER_URL}/auth
- REACT_APP_SERVER_FILES_URL=${LOCAL_SERVER_URL}/files
depends_on:
- twenty-back

twenty-back:
image: twentycrm/twenty-server:${TAG}
ports:
- 3000:3000
environment:
- SIGN_IN_PREFILLED=${SIGN_IN_PREFILLED}
- PG_DATABASE_URL=${PG_DATABASE_URL}
- FRONT_BASE_URL=${FRONT_BASE_URL}
- PORT=3000
- STORAGE_TYPE=local
- STORAGE_LOCAL_PATH=.local-storage
- ACCESS_TOKEN_SECRET=${ACCESS_TOKEN_SECRET}
- LOGIN_TOKEN_SECRET=${LOGIN_TOKEN_SECRET}
- REFRESH_TOKEN_SECRET=${REFRESH_TOKEN_SECRET}
depends_on:
- twenty-db

twenty-db:
image: twentycrm/twenty-postgres:${TAG}
volumes:
- twenty-db-data:/bitnami/postgresql
ports:
- 5432:5432
environment:
- POSTGRESQL_USER=${POSTGRES_USER}
- POSTGRESQL_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRESQL_DB=default

volumes:
twenty-db-data:
charles
charles5mo ago
ok so you have a persistent volume which is good make sure your database backup contains your data by browsing it quickly and you should be good to go to update your TAG to v0.10
greg [iero]
greg [iero]5mo ago
Yes, I looked for Companies, Projects and other objects and they are in in the dumps
charles
charles5mo ago
ok! let's upgrade and fix the migration issues
greg [iero]
greg [iero]5mo ago
I keep the DB container and I upgrade others or do I update them all?
charles
charles5mo ago
Keep the DB container : - it's fine as we haven't change anything there since 0.3.2. However it's good to see how to upgrade it for the future Upgrade the DB container : - should be fine but I have never tried it with a self host version so I'm not sure
Want results from more Discord servers?
Add your server