Skip to content
Snippets Groups Projects
Commit d960786f authored by David Hrbáč's avatar David Hrbáč
Browse files

nginx owner solution

parent ccddfc62
No related branches found
No related tags found
4 merge requests!368Update prace.md to document the change from qprace to qprod as the default...,!367Update prace.md to document the change from qprace to qprod as the default...,!366Update prace.md to document the change from qprace to qprod as the default...,!323extended-acls-storage-section
Pipeline #
...@@ -45,13 +45,9 @@ deploy to stage: ...@@ -45,13 +45,9 @@ deploy to stage:
# WARNING: use only in docker container, if you use it with shell you will overwrite your user's ssh config # WARNING: use only in docker container, if you use it with shell you will overwrite your user's ssh config
- mkdir -p ~/.ssh - mkdir -p ~/.ssh
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config - echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
- adduser nginx - adduser --quiet --no-create-home nginx
script: script:
#- ls site/ - chown nginx:nginx site -R
#- echo $CI_BUILD_REF_NAME
#- ssh root@"$SSH_HOST_STAGE" uptime
- chown nginx site -R
- ls
- rsync -av --delete site/ root@"$SSH_HOST_STAGE":/srv/docs.it4i.cz/devel/$CI_BUILD_REF_NAME/ - rsync -av --delete site/ root@"$SSH_HOST_STAGE":/srv/docs.it4i.cz/devel/$CI_BUILD_REF_NAME/
deploy to production: deploy to production:
...@@ -70,10 +66,9 @@ deploy to production: ...@@ -70,10 +66,9 @@ deploy to production:
# WARNING: use only in docker container, if you use it with shell you will overwrite your user's ssh config # WARNING: use only in docker container, if you use it with shell you will overwrite your user's ssh config
- mkdir -p ~/.ssh - mkdir -p ~/.ssh
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config - echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
- adduser --quiet --no-create-home nginx
script: script:
#- ls site/ - chown nginx:nginx site -R
#- echo $CI_BUILD_REF_NAME
#- ssh root@"$SSH_HOST_STAGE" uptime
- rsync -av --delete site/ root@"$SSH_HOST_STAGE":/srv/docs.it4i.cz/site/ - rsync -av --delete site/ root@"$SSH_HOST_STAGE":/srv/docs.it4i.cz/site/
only: only:
- master - master
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment