Top Menu

Jump to content
Home
    Modules
      • Projects
      • Activity
      • Work packages
      • Gantt charts
      • Calendars
      • Team planners
      • Boards
      • News
    • Getting started
    • Introduction video
      Welcome to OpenProject Community
      Get a quick overview of project management and team collaboration with OpenProject. You can restart this video from the help menu.

    • Help and support
    • Upgrade to Enterprise edition
    • User guides
    • Videos
    • Shortcuts
    • Community forum
    • Enterprise support

    • Additional resources
    • Data privacy and security policy
    • Digital accessibility (DE)
    • OpenProject website
    • Security alerts / Newsletter
    • OpenProject blog
    • Release notes
    • Report a bug
    • Development roadmap
    • Add and edit translations
    • API documentation
  • Sign in
      Forgot your password?

      or sign in with your existing account

      Google

Side Menu

  • Overview
  • Activity
    Activity
  • Roadmap
  • Work packages
    Work packages
  • Gantt charts
    Gantt charts
  • Calendars
    Calendars
  • Team planners
    Team planners
  • Boards
    Boards
  • News
  • Forums

Content

Support Installation & Updates
  1. OpenProject
  2. Forums
  3. Support Installation & Updates
  4. [SOLVED] Can't update Postgresql in docker-compose enviroment

[SOLVED] Can't update Postgresql in docker-compose enviroment

Added by Florian Krebber over 3 years ago

Hey all,

i spent most of the day trying to get this, but i can't. I tried every possible solution i found but ALWAYS the problem seems to be that the old Postgresql 9.6 server ist not stopping - it always keeps restarting itself.

I installed Openproject via docker-compose and today did an upgrade to the last version: 12. That worked fine. But now i keep getting the message that i should upgrade to Postgresql 13. Which i tried. I tried whatever solution i can find, from ./docker/prod/postgres-db-updgrade script over doing it manually inside the container with pg_upgrade etc. NONE worked because every time shutting down the old Postgresql 9.6 didn't worked as it ALWAYS keeps restarting itself.

This is my docker-compose.yml:

version: '3'
services:
    openproject:
        image: openproject/community:12
        restart: always
        container_name: openproject_server
        volumes:
            - ./var/lib/openproject/pgdata:/var/openproject/pgdata
            - ./var/lib/openproject/static:/var/openproject/assets
        environment:
            - SECRET_KEY_BASE=secret
            - EMAIL_DELIVERY_METHOD=smtp
            - SMTP_ADDRESS=cleared-for-security
            - SMTP_PORT=465
            - SMTP_DOMAIN=cleared-for-security
            - SMTP_AUTHENTICATION=login
            - SMTP_ENABLE_STARTTLS_AUTO=true
            - SMTP_USER_NAME="cleared-for-security"
            - SMTP_PASSWORD="cleared-for-security"
            - DATABASE_URL=postgres://openproject:openproject@127.0.0.1/openproject
        tty: true
        ports:
            - 8085:80
        expose:
            - 80
            - 443

I really can't get my head around this. Is there any script in place inside the container which keeps restarting the Postgresql? Any help woul dbe much appreciated!

Thanks and take care
Florian


Replies (4)

RE: Can't update Postgresql in docker-compose enviroment - Added by Cyril Rohr over 3 years ago

Hey, I don't see your container definition for the postgres service. Unless you're using the all-in-one docker image? But then not really sure what you mean by "the postgres container keeps restarting". As a tip though, you should replace restart: always with restart: unless-stopped so that a manual stop by the administrator (i.e. you) really stops the container. The restart: always policy will have the docker daemon always restart the container, no matter what.

RE: Can't update Postgresql in docker-compose enviroment - Added by Florian Krebber over 3 years ago

Hey Cyril,

thanks for the info - yes, i am using the all-in-one-package. And actually it was my fault after all. Following the instructions here https://www.openproject.org/docs/installation-and-operations/misc/migration-to-postgresql13/ worked like a charm - i just forgot somehow to copy the new data to the old data directory. So, sorry for the fuzz!

Take care and thanks again
Florian

RE: Can't update Postgresql in docker-compose enviroment - Added by Cyril Rohr over 3 years ago

Great then! Thanks for the update

RE: [SOLVED] Can't update Postgresql in docker-compose enviroment - Added by Oliver Günther over 3 years ago

Hi Florian,

great to hear you were able to resolve it after all. Do you have any improvements on the migration guide? I.e., something we could have written more clearly in the guide?

Cheers

Oliver

  • (1 - 4/4)
Loading...