How to Update Gitlab Docker from 10.1.2 to Latest Version?

I have the following docker-compose file that I am using under an installation of gitlab 10.1.2, which I want to upgrade to the latest version:

version: "3"
services:
  gitlab:
    container_name: gitlab
    image: "gitlab/gitlab-ce:10.1.2-ce.0"
    restart: unless-stopped
    hostname: "gitlab.local.com"
    links:
      - postgresql:postgresql
      - redis:redis
    environment:
      GITLAB_OMNIBUS_CONFIG: |
        postgresql['enable'] = false
        gitlab_rails['db_username'] = "gitlab_user"
        gitlab_rails['db_password'] = "MY_PASSWORD"
        gitlab_rails['db_host'] = "postgresql"
        gitlab_rails['db_port'] = "5432"
        gitlab_rails['db_database'] = "gitlab"
        gitlab_rails['db_adapter'] = 'postgresql'
        gitlab_rails['db_encoding'] = 'utf8'
        redis['enable'] = false
        gitlab_rails['redis_host'] = 'redis'
        gitlab_rails['redis_port'] = '6379'
        external_url 'http://gitlab.local.com'
        gitlab_rails['gitlab_shell_ssh_port'] = 9022
    ports:
      - "9443:443"
      - "9080:80"
      - "9022:22"
    volumes:
      - ${GITLAB}/gitlab/config:/etc/gitlab:rw
      - ${GITLAB}/gitlab/logs:/var/log/gitlab:rw
      - ${GITLAB}/gitlab/data:/var/opt/gitlab:rw

  postgresql:
    container_name: postgres
    restart: unless-stopped
    image: postgres:9.6.2-alpine
    environment:
      - POSTGRES_USER=gitlab_user
      - POSTGRES_PASSWORD=MY_PASSWORD
      - POSTGRES_DB=gitlab
    volumes:
      - ${POSTGRES}:/var/lib/postgresql:rw
    ports:
      - 3008:5432

  redis:
    container_name: redis
    restart: unless-stopped
    image: redis:3.0.7-alpine

I tried to do this before backing up my real GitLab installation but I always get errors and weird stuff:

I first created a pg_dumpall from the Docker container. Than I updated the images for the first major version, according to the update path of GitLab, like this:

version: "3"
services:
  gitlab:
    container_name: gitlab
    image: "gitlab/gitlab-ce:10.8.7-ce.0"
    restart: unless-stopped
    hostname: "gitlab.local.com"
    links:
      - postgresql:postgresql
      - redis:redis
    environment:
      GITLAB_OMNIBUS_CONFIG: |
        postgresql['enable'] = false
        gitlab_rails['db_username'] = "gitlab_user"
        gitlab_rails['db_password'] = "MY_PASSWORD"
        gitlab_rails['db_host'] = "postgresql"
        gitlab_rails['db_port'] = "5432"
        gitlab_rails['db_database'] = "gitlab"
        gitlab_rails['db_adapter'] = 'postgresql'
        gitlab_rails['db_encoding'] = 'utf8'
        redis['enable'] = false
        gitlab_rails['redis_host'] = 'redis'
        gitlab_rails['redis_port'] = '6379'
        external_url 'http://gitlab.local.com'
        gitlab_rails['gitlab_shell_ssh_port'] = 9022
    ports:
      - "9443:443"
      - "9080:80"
      - "9022:22"
    volumes:
      - ${GITLAB}/gitlab/config:/etc/gitlab:rw
      - ${GITLAB}/gitlab/logs:/var/log/gitlab:rw
      - ${GITLAB}/gitlab/data:/var/opt/gitlab:rw

  postgresql:
    container_name: postgres
    restart: unless-stopped
    image: postgres:9.6.3-alpine
    environment:
      - POSTGRES_USER=gitlab_user
      - POSTGRES_PASSWORD=MY_PASSWORD
      - POSTGRES_DB=gitlab
    volumes:
      - ${POSTGRES}:/var/lib/postgresql:rw
    ports:
      - 3008:5432

  redis:
    container_name: redis
    restart: unless-stopped
    image: redis:3.0.7-alpine

My problems are: when I access the new GitLab installation, it asks me for a new root password, my users are all gone, no projects show up at either my test users or my root user, but the GitLab Log page shows that both the testing users and their projects were created.

What am I doing wrong here? How can I upgrade this?