Good afternoon!
Today we'll be creating a CI/CD pipeline using GitLab to automate a dockerized ReactJS deployment š
Introduction
So tod...
For further actions, you may consider blocking this person and/or reporting abuse
Hey, thank you very much for very detailed example.
I did it successfully and I found some point
.gitlab-ci.yml
file, at deploy state, port should be 3005chmod
, I've replaced by this lineI used EC2 Ubuntu 18.04 Server.
Thank you again <3
oh! sorry for that mistake bro! š
but thanks for sharing your solution this will help other devs! šŖ
and thank you for reading bro! š
You can set your private key gitlab variable as file and then you don't have to create key.pem file
I just got tricked with that error. Thanks for the fix.š„³
Please share with us the updated code
Thanks for a good and informative article. It worked for me.
Who follows the example, don't forget to make
SSH_PRIVATE_KEY
variable ofType: File
(as it is shown on screenshot). I think it would be good to update the article and state it in the text explicitly, if possible.Yes, you are right. It took my one day to solve.
Love it, it is very detailed
thanks for reading and for the feedback š
Reference link Gitlab Documentation: click here
After
docker pull registry.gitlab.com/...
Output like this :
Error response from daemon: pull access denied for registry.gitlab.com/..., repository does not exist or may require 'docker login': denied: requested access to the resource is denied
You need to login again using this command
docker login registry.example.com -u <username_of_gitlab_account> -p <token>
e.g:docker login registry.gitlab.com -u <username_of_gitlab_account> -p <token>
Token get from: Go to your gitlab profile icon > Select "Edit Profile" > on left hand side tab select "Access Tokens", then add any name on "Token name" Box for example: test-token, choose any of your "expiration date" > for "Select Scope", check all boxes > Then Click on box: "Create personal access token" > on top you will get token string,
come back to
docker login registry.example.com -u <username_of_gitlab_account> -p <token>
paste that token replace of your
<token>
and run on your server terminal.It is expected that you will create local environment and have gitlab-yml setup for local environment. Then we could I deploy into server.
What is the use of locker docker here.
Where is Nginx working?
Please help?
šššš
Thank you for the great tutorial! I just wonder how is the Dockerfile connected to the .gitlab-ci.yml. Why do you run npm build in the build stage of .gitlab-ci.yml when you does it already in Dockerfile?
Really nice! I think that to make more robust the production you could use docker swarm that offer nice features for example container restarting in case of down. But is more Docker thing and out of educational purpose of the post.
For some reason I'm getting this error.
I'm deploying to ec2, using de .pem key given by aws (passed as env var). But still, it doesn't work.
Hello there! I got issue from
ssh -o StrictHostKeyChecking=no -i $SSH_PRIVATE_KEY root@$PROD_SERVER_IP "docker pull registery_private"
It's return access denied
me too