Skip to content

Remove dependency from personal Docker hub acc #19

@ira-halenok

Description

@ira-halenok

At the moment, all dockers used for Prosimos web application are stored in the personal docker hub account (irynahalenok).
Since I am leaving, we need to take a look into this.

We need to remove the dependency in one of the following way:

  1. we can just change one personal account to the other (for example, Serhii's)
  2. generalised approach might be considered where we store dockers for all PIX projects together. This will resolve the issue in the long-term and won't require us to change setup when people leaves. I can see that nokal account is used for simod, waiting time analysis and others. So maybe thaa account might be a good one to consider.

The general approach might look the following way. We use docker images in two places when we:

  1. push new images, meaning new version of application

  2. load image in order to start the container on the server (or locally).
    As a result, we introduce changes in two places:

  3. workflow setup requires the following information:

  • DOCKER_USERNAME: account username
  • DOCKER_PASSWORD: password to the account. Since Docker Hub supports generating token (instead of using a plain password), there are some steps that need to be done to retrieve the passport:
    1. Go to Docker Hub and login
    2. Click on username (right upper corner) and click Account settings button
    3. Choose Security tab from left-hand menu
    4. Generate new access token
  • DOCKER_NAMESPACE: when using personal account equals to the same value as DOCKER_USERNAME
  • DOCKER_REPOSITORY: depends on what image we deploy, could be prosimos-api, prosimos-client, prosimos-celery, etc.

In order not to expose these values in the plain text, we save those values as secrets of the github repository.

  1. docker-compose file of prosimos-docker repo. Here, we just use the image name from which we start container.

NOTE: While this issue is created in prosimos-microservice, the required changes touch almost all repositories. So all listed changes should be applied respectively.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions