Skip to content
Snippets Groups Projects
Commit 62e96cb2 authored by jonasled's avatar jonasled
Browse files

removed deploy

parent f72b30ab
No related branches found
No related tags found
No related merge requests found
Pipeline #321 failed
...@@ -6,7 +6,6 @@ services: ...@@ -6,7 +6,6 @@ services:
stages: stages:
- build - build
- build-release - build-release
- deploy
build: #This will be executed on every push. It builds an docker image, which is named after the branch, so you can always use the last state of the different branches. build: #This will be executed on every push. It builds an docker image, which is named after the branch, so you can always use the last state of the different branches.
...@@ -37,23 +36,4 @@ build-release: #This will be executed if you push on master, it makes a new rele ...@@ -37,23 +36,4 @@ build-release: #This will be executed if you push on master, it makes a new rele
- sudo docker pull python:3 - sudo docker pull python:3
- sudo docker build -t gitlab.jonasled.de/jonasled/url_shorter_docker . #Build the image with the name already set to push - sudo docker build -t gitlab.jonasled.de/jonasled/url_shorter_docker . #Build the image with the name already set to push
- sudo docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY #Login to docker registry, username and password will be filled while executing - sudo docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY #Login to docker registry, username and password will be filled while executing
- sudo docker push gitlab.jonasled.de/jonasled/url_shorter_docker #Push the image onto the Docker registry. - sudo docker push gitlab.jonasled.de/jonasled/url_shorter_docker #Push the image onto the Docker registry.
\ No newline at end of file
deploy:
stage: deploy
only:
- master
script:
- sudo apt-get install -y python-pip #install pip, this is needed to install docker-compose in the next step
- sudo pip install docker-compose #Install docker-compose with pip
- replace "5000:5000" "5003:5000" -- docker-compose.yml #replace in docker-compose some settings. Variables will be replaced on execute.
- replace "domains=" "domains=$domains" -- docker-compose.yml #The domains I use for my url shorter
- replace "recaptcha_private=" "recaptcha_private=$recaptcha_private" -- docker-compose.yml #Recaptcha keys for protecting the create form from attacks
- replace "recaptcha_public=" "recaptcha_public=$recaptcha_public" -- docker-compose.yml
- replace "GITHUB_CLIENT_ID=" "GITHUB_CLIENT_ID=$GITHUB_CLIENT_ID" -- docker-compose.yml #Keys used for oauth.
- replace "GITHUB_CLIENT_SECRET=" "GITHUB_CLIENT_SECRET=$GITHUB_CLIENT_SECRET" -- docker-compose.yml
- replace "GOOGLE_CLIENT_ID=" "GOOGLE_CLIENT_ID=$GOOGLE_CLIENT_ID" -- docker-compose.yml
- replace "GOOGLE_CLIENT_SECRET=" "GOOGLE_CLIENT_SECRET=$GOOGLE_CLIENT_SECRET" -- docker-compose.yml
- sudo docker-compose up -d #Start the new container
environment: master
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment