full-stack-fastapi-template
full-stack-fastapi-template copied to clipboard
Private GitLab deployment
First of all, Thank you! Your DockerSwarm Rocks project is amazing detailed and easy to use. I have followed that guide and setup a 6 node cluster with 3 managers and 3 workers. I also setup a 7th vm for self managed gitlab and connected the runners following your guide. It was a breeze.
I recently wanted to learn the fastapi framework and decided to use your template as it seemed very comprehensive and since the other stacks your designed were working so well. I cloned this repo and ran the cookiecutter py app. it created all of the files and detailed readme.md I committed these to my gitlab and began the process of deployment. The test all passed however when moving to deployment of staging or production I received this error.
The push refers to repository [docker.io/library/backend] denied: requested access to the resource is denied Cleaning up file based variables 00:01 ERROR: Job failed: exit code 1
it appear to me as if it is attempting to connect with dockerhub rather than my gitlab registry. I tried logging into my gitlab reg prior to running the docker login gitlab.myprivatesite.com:5050
and it is successfully connecting but still returns the error above. Any advice you could provide would be greatly appreciated. Thank you again for such a wonderful stack.
Cheers!
I have the same issue
I ran into this as well today.
Take a look at https://docs.docker.com/compose/reference/push/
and compare it with your settings in .env
for DOCKER_IMAGE_{SERVICE}
.
If you haven't specified the private registry (e.g. gitlab.private-registy.com:{port}/accountname/repo/service
) it is highly likely you are trying to push against docker.io, which is mentioned in the error The push refers to repository [docker.io/library/backend]
.