Skip to content

Commit

Permalink
#49 use deploy key for checking out current revision
Browse files Browse the repository at this point in the history
  • Loading branch information
Sh4kE committed Nov 18, 2016
1 parent 2eb4373 commit b518e2d
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 7 deletions.
27 changes: 27 additions & 0 deletions .ssh/id_rsa
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEAxfLmcQex8BowCjw0KLATsahzsk2fxjWW8m5xopwfujdz9xgD
6z0LSZiOS6dIM8ykAXEjT8I3QZS+w30w6ASO1FvhARZ0yL+72c96KqUzaSfJ57Av
5gP+WU7uyUISV6ljZn14UVRPlbp4WRWGRCCB7Z02I1Nn3lAqTaM7vt/T0dSQJrtE
9TxnelJqisgIf5GMpGQUBlvEmKPRHraNLCo6I7W7O0D3QeoFrFcnrYqtx1B5musG
TwdEAQeO7AqjxHmRfgNMnLMSjI2WsqqybjaV9B0rDxlIQ+hjThKcilSx7zj2xCq1
haqgMwZhjRXsjatABaDhiKaEIbg5vZJM1zpgZwIDAQABAoIBACKzl2RfRflijeNt
dHNhksJFVqr+YrEbue+cHv2zwvghOoopwp4doHnxbZijpcu251V9YQRddtRfYCXj
L4ytJ+DgjoxjRGvg+OyRK8iIF4AqwoGEaJE5SACeDsxncdG+VzejbVFMp3sHKovr
cxNEY6KlOdVtjLrzcMcVg6bNlFOnUf8sTiJ//TK98S3BNKVOz0U7vzGuGpInXbV2
33F5ucv+NNl8sfidoH0Vm8bppR8a1fugb6Qs2PvcLmYM6cpQnx7WmAnA3vOiJofS
kpd18YRH5kB8q6dRsYVOcRbim4jC+dWH49iQIz+4RDNZiDBOsBMOfm4bl6lqlmmp
CkrvzNECgYEA5mBG7HPgKOn/nDEDPRjGYi+wfxQy0pjLex1kpoQJM2d/BTR/i3pP
/VsbOdFBhY9OlEFs2twH+7Hx4aQjdJg2mkv9o4nmDtfN6+eRbQRzdBtVsWufl1s6
7lqFpK9HLauTo38OG6IVxha3mc8P09v/aVsJeH/6du9WYGeZutbjqP8CgYEA2/dK
UI4O9Efs7wXpjRyEVxYL4Gf7QuDDSEh56/8o0apSMEBA9DqWMpfSZ2A7QJQq3vG8
1/G6NELv7NMSFL27l3X9N99JVVYz/7BnASPIxSXdxIrsD/cFAdG/2hRTI55Bjf6Y
QkPuEvSiS68C9wd7kRtqbxp/UGZRAef53R11oJkCgYA2Ob839OZ0eu/Bkf/TJ7u6
bMM8hkKYM4Lhzb9dOoL36IqLbRoAeJ/PYNx9tXWYvGyglO3MbjIq2m220O3PieyA
URa4ocLXB5De0Dj40i1izPRUuKJt+/lZFVGTu/YjF9m+iC+H7ZT2dW5t88Ej+wqZ
f+YwyN7pk9hfBMO4qNAZfQKBgQDSpu4KWyFDG6Zx+W2C7+5lH/3buHjNwUYC8TWh
pkhHEh+HieEqgvjYFsEust/LppmvzD2XaC10Yy411KUaK+F82UfYvAMUsGs30I20
b7qT4wGQeaI8X8nxxhc/F/vOvn31J/5UZ42VpaXPaRkjzYyumFzDbdLDAllNxARr
lwzQ8QKBgACh3L7TrFKdttSr0eUCyJAmSEawR+uEmsvONaLclkdvgG8dtcSitDCz
AjdQsKHzAsj0mV9qkVWgUQJCp+rMAFkYNcFf0wKCnl1I87YGpptq8sBDd6L5IaLp
qSklIa3mOX7UKzs8UpsHmGWVZOxenzACfbIsRw2iXlJ5VC+VCldv
-----END RSA PRIVATE KEY-----
1 change: 1 addition & 0 deletions .ssh/id_rsa.pub
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDF8uZxB7HwGjAKPDQosBOxqHOyTZ/GNZbybnGinB+6N3P3GAPrPQtJmI5Lp0gzzKQBcSNPwjdBlL7DfTDoBI7UW+EBFnTIv7vZz3oqpTNpJ8nnsC/mA/5ZTu7JQhJXqWNmfXhRVE+VunhZFYZEIIHtnTYjU2feUCpNozu+39PR1JAmu0T1PGd6UmqKyAh/kYykZBQGW8SYo9Eeto0sKjojtbs7QPdB6gWsVyetiq3HUHma6wZPB0QBB47sCqPEeZF+A0ycsxKMjZayqrJuNpX0HSsPGUhD6GNOEpyKVLHvOPbEKrWFqqAzBmGNFeyNq0AFoOGIpoQhuDm9kkzXOmBn sh4ke@Beteigeuze
14 changes: 7 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@ FROM python:3-onbuild

ENV PYTHONUNBUFFERED 1
ENV DJANGO_SETTINGS_MODULE ofm_helper.settings.prod
ENV EDITOR="vim"

WORKDIR /usr/src/app
RUN mkdir -p ~/.ssh
RUN ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts
COPY .ssh/* /root/.ssh/

# put current release into version file
#RUN git fetch --tags
#RUN git describe --tags --always | awk '{split($0,a,"-"); print a[1]}'
#RUN git describe --tags --always | awk '{split($0,a,"-"); print a[1]}' > version
RUN echo "0.0.1" > version
RUN git fetch --tags
RUN git describe --tags --always | awk '{split($0,a,"-"); print a[1]}'
RUN git describe --tags --always | awk '{split($0,a,"-"); print a[1]}' > version

# migrate database to current structure
RUN mkdir logs

# put static files
RUN python3 manage.py collectstatic --no-input

CMD ["gunicorn", "-c", "gunicorn_conf.py", "ofm_helper.wsgi"]
CMD ["gunicorn", "-c", "gunicorn_conf.py", "ofm_helper.wsgi"]

4 comments on commit b518e2d

@StegSchreck
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ssh keys?

@Sh4kE
Copy link
Member Author

@Sh4kE Sh4kE commented on b518e2d Nov 22, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is a read only permission, so it should be no problem to commit in git

@Sh4kE
Copy link
Member Author

@Sh4kE Sh4kE commented on b518e2d Nov 22, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was that your question? :P

@StegSchreck
Copy link
Member

@StegSchreck StegSchreck commented on b518e2d Nov 22, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so this ssh key can't be used for something else? then ok.

Please sign in to comment.