R
R
RUDIEMEANT2020-09-09 07:20:15
GitHub
RUDIEMEANT, 2020-09-09 07:20:15

How to link Github to Google Cloud Platform?

Hello.

I am fairly new to Docker and am a complete newbie to the GCP ecosystem .

My project is telegram bot on python-aiogram which is launched by python3.8 app.py command and doesn't quit after that. In general, nothing supernatural, except that I use sqlite3 and on the host I need to store a db.db file that should not be updated / deleted.

My task now is to stop the bot after each commit on master, update the code ( git pull ) and start again
python3.8 app.py
. If I understand everything correctly, I cannot use the .sh script, since the repository is closed (credentials are needed for the pool and commit)

GCP has the ability to set up a trigger for commits (I did it), but now I don't understand how to use this trigger (which creates a container using a Dockerfile from the repository) to stop and delete the old container.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2020-09-09
@q2digger

>>> If I understand everything correctly, I can't use the .sh script because the repository is private (credentials are needed for the pool and commit)
why is that? you just need to add your ssh-key to the github and to your project and do pulls, requests and anything from the script

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question