From 0c7bbcc98886086294653a40a68d9cd9c0dd0771 Mon Sep 17 00:00:00 2001 From: Marvin Steadfast Date: Fri, 17 Mar 2017 20:32:53 +0000 Subject: [PATCH] fix lftp and more refactoring in writingenv --- Makefile | 2 +- writing_env/Dockerfile | 15 +++++++++++---- .../root/home/blog/playbooks/writing_env.yml | 14 -------------- 3 files changed, 12 insertions(+), 19 deletions(-) diff --git a/Makefile b/Makefile index 5481196..ebdb142 100644 --- a/Makefile +++ b/Makefile @@ -102,7 +102,7 @@ dropbox_upload: publish cp -r $(OUTPUTDIR)/* $(DROPBOX_DIR) ftp_upload: publish - lftp ftp://$(FTP_USER):$(FTP_PASS)@$(FTP_HOST) -e "set ftp:ssl-allow no; mirror -R --ignore-time --no-perms --parallel=4 -e --use-cache -v $(OUTPUTDIR) $(FTP_TARGET_DIR); quit" + lftp ftp://$(FTP_USER):$(FTP_PASS)@$(FTP_HOST) -e "set ssl:verify-certificate no; mirror -R --ignore-time --no-perms --parallel=4 -e --use-cache -v $(OUTPUTDIR) $(FTP_TARGET_DIR); quit" s3_upload: publish s3cmd sync $(OUTPUTDIR)/ s3://$(S3_BUCKET) --acl-public --delete-removed --guess-mime-type diff --git a/writing_env/Dockerfile b/writing_env/Dockerfile index 39d2b61..8371d97 100644 --- a/writing_env/Dockerfile +++ b/writing_env/Dockerfile @@ -1,15 +1,19 @@ FROM alpine:3.5 -ENV SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt -ENV BLOG_UID=1000 BLOG_GID=1000 +ENV LANG C.UTF-8 +ENV SSL_CERT_FILE /etc/ssl/certs/ca-certificates.crt +ENV BLOG_UID 1000 +ENV BLOG_GID 1000 ADD root / RUN set -ex \ - && apk add --no-cache \ + && apk add --update \ ansible \ bash \ + ca-certificates \ g++ \ + git \ openssh \ python \ sudo \ @@ -22,7 +26,10 @@ RUN set -ex \ USER blog RUN set -ex \ + && git clone https://github.com/xsteadfastx/batcave.git ~/.batcave \ + && ansible-playbook -i ~/.batcave/hosts ~/.batcave/shell.yml -c local --extra-vars="hosts=127.0.0.1" \ && ansible-playbook -c local /home/blog/playbooks/writing_env.yml \ - && /bin/zsh -c "source /home/blog/.zshrc && antigen update" + && /bin/zsh -c "source /home/blog/.zshrc && antigen update" \ + && sudo rm -rf /var/cache/apk/* ENTRYPOINT ["/usr/local/bin/entrypoint"] diff --git a/writing_env/root/home/blog/playbooks/writing_env.yml b/writing_env/root/home/blog/playbooks/writing_env.yml index b561b91..1347e6b 100644 --- a/writing_env/root/home/blog/playbooks/writing_env.yml +++ b/writing_env/root/home/blog/playbooks/writing_env.yml @@ -84,26 +84,12 @@ backup=yes become: yes - - name: clone batcave - git: - repo=https://github.com/xsteadfastx/batcave.git - dest=~/.batcave - force=yes - - - name: run batcave - command: - ansible-playbook -i hosts shell.yml -c local --extra-vars="hosts=127.0.0.1" - chdir=~/.batcave - environment: - SSL_CERT_FILE: /etc/ssl/certs/ca-certificates.crt - - name: export variables lineinfile: dest=~/.zshrc line='{{ item }}' with_items: - export PYTHONIOENCODING=UTF-8 - - export LC_ALL=C.UTF-8 - export SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt - name: no git colors