Docker Openproject

Run

Assuming setup is finished.

docker run openproject

Upgrade

  1. First, pull the latest version of the image:

    docker pull openproject/community:VERSION
    # e.g. docker pull openproject/community:10
    
  2. Then stop and remove your existing container (we assume that you are running with the recommended production setup here):

    docker stop openproject
    docker rm openproject
    
  3. Then re-setup the openproject container. Some key points is that we used -p 80:80 instead of -p 8080:80 listed on the tutorial as this is the configuration we are using.

    docker run -d -p 80:80 --name openproject -e SECRET_KEY_BASE=secret \
    -v /var/lib/openproject/pgdata:/var/lib/postgresql/9.6/main \
    -v /var/lib/openproject/logs:/var/log/supervisor \
    -v /var/lib/openproject/static:/var/db/openproject \
    openproject/community:10
    
  4. Give the server some time to start up (around a minute).

  5. When comfortable with the new version, you may delete the old image.

    1. Delete associated containers, if not yet done.

      $ docker ps -a
      CONTAINER ID        IMAGE                      COMMAND                  CREATED             STATUS                        PORTS                          NAMES
      bd863cc8af97        openproject/community:10   "./docker/entrypoint…"   15 minutes ago      Up 15 minutes                 0.0.0.0:80->80/tcp, 5432/tcp   openproject
      259d457c3122        openproject/community:8    "/usr/src/app/docker…"   16 months ago       Exited (137) 36 minutes ago                                  openproject-v2
      $ docker rm 259d457c3122
      
    2. Delete the target images

      $ docker images
      REPOSITORY              TAG                 IMAGE ID            CREATED             SIZE
      openproject/community   10                  7e077d20852b        4 weeks ago         2.04GB
      openproject/community   8                   49ccf8629fb0        16 months ago       2.6GB
      $ docker rmi 49ccf8629fb0
      

Extending disk space

  1. Increase the EC2 volume via the AWS console.
  2. Check the partition name

    lsblk
    NAME    MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
    xvda    202:0    0  12G  0 disk
    `-xvda1 202:1    0  12G  0 part /
    xvdf    202:80   0   1G  0 disk [SWAP]
    
  3. Extend the appropriate partition.

    sudo growpart /dev/xvda 1
    CHANGED: disk=/dev/xvda partition=1: start=4096 old: size=16773086,end=16777182 new: size=25161694,end=25165790
    
  4. To check

    $ sudo df -h
    Filesystem      Size  Used Avail Use% Mounted on
    devtmpfs        483M   64K  483M   1% /dev
    tmpfs           493M     0  493M   0% /dev/shm
    /dev/xvda1      7.8G  6.0G  1.8G  78% /
    overlay         7.8G  6.0G  1.8G  78% /var/lib/docker/overlay2/3b1e7ffe799fedcf6a6814771aa4bdeea45936b66fafc3259081a07bf57793f7/merged
    shm              64M  4.0K   64M   1% /var/lib/docker/containers/259d457c3122ae93061d0708586e26aa6d81960e67e96c00ec41472829188460/mounts/shm
    

References:

Avatar
Luke Sy
PhD Candidate

My research interests include state estimation, robotics, wearable sensors, machine learning, and biomedical engineering.

Next
Previous