got rid of vagrant. using docker itself for writingenv
This commit is contained in:
parent
d5f686a4be
commit
bff1571b4e
2
.gitignore
vendored
2
.gitignore
vendored
@ -46,8 +46,6 @@ nosetests.xml
|
|||||||
|
|
||||||
# OWN STUFF
|
# OWN STUFF
|
||||||
.ftp_pass.txt
|
.ftp_pass.txt
|
||||||
.vagrant/*
|
|
||||||
pelican-plugins
|
|
||||||
.DS_Store
|
.DS_Store
|
||||||
node_modules
|
node_modules
|
||||||
*.retry
|
*.retry
|
||||||
|
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[submodule "pelican-plugins"]
|
||||||
|
path = pelican-plugins
|
||||||
|
url = git@github.com:xsteadfastx/pelican-plugins.git
|
6
Makefile
6
Makefile
@ -53,6 +53,7 @@ help:
|
|||||||
@echo ' make cf_upload upload the web site via Cloud Files'
|
@echo ' make cf_upload upload the web site via Cloud Files'
|
||||||
@echo ' make github upload the web site via gh-pages '
|
@echo ' make github upload the web site via gh-pages '
|
||||||
@echo ' make newpost create new post '
|
@echo ' make newpost create new post '
|
||||||
|
@echo ' make writingenv start writing environment '
|
||||||
@echo ' '
|
@echo ' '
|
||||||
@echo 'Set the DEBUG variable to 1 to enable debugging, e.g. make DEBUG=1 html'
|
@echo 'Set the DEBUG variable to 1 to enable debugging, e.g. make DEBUG=1 html'
|
||||||
@echo ' '
|
@echo ' '
|
||||||
@ -116,4 +117,7 @@ github: publish
|
|||||||
newpost:
|
newpost:
|
||||||
$(PY) $(BASEDIR)/newpost.py
|
$(PY) $(BASEDIR)/newpost.py
|
||||||
|
|
||||||
.PHONY: html help clean regenerate serve devserver publish ssh_upload rsync_upload dropbox_upload ftp_upload s3_upload cf_upload github
|
writingenv:
|
||||||
|
docker-compose run --rm blog /bin/zsh
|
||||||
|
|
||||||
|
.PHONY: html help clean regenerate serve devserver publish ssh_upload rsync_upload dropbox_upload ftp_upload s3_upload cf_upload github newpost writingenv
|
||||||
|
@ -1593,8 +1593,10 @@ span#checkpoint_status,span#autosave_status{font-size:small}
|
|||||||
.highlight .mh { color: #666666 } /* Literal.Number.Hex */
|
.highlight .mh { color: #666666 } /* Literal.Number.Hex */
|
||||||
.highlight .mi { color: #666666 } /* Literal.Number.Integer */
|
.highlight .mi { color: #666666 } /* Literal.Number.Integer */
|
||||||
.highlight .mo { color: #666666 } /* Literal.Number.Oct */
|
.highlight .mo { color: #666666 } /* Literal.Number.Oct */
|
||||||
|
.highlight .sa { color: #BA2121 } /* Literal.String.Affix */
|
||||||
.highlight .sb { color: #BA2121 } /* Literal.String.Backtick */
|
.highlight .sb { color: #BA2121 } /* Literal.String.Backtick */
|
||||||
.highlight .sc { color: #BA2121 } /* Literal.String.Char */
|
.highlight .sc { color: #BA2121 } /* Literal.String.Char */
|
||||||
|
.highlight .dl { color: #BA2121 } /* Literal.String.Delimiter */
|
||||||
.highlight .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
|
.highlight .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
|
||||||
.highlight .s2 { color: #BA2121 } /* Literal.String.Double */
|
.highlight .s2 { color: #BA2121 } /* Literal.String.Double */
|
||||||
.highlight .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */
|
.highlight .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */
|
||||||
@ -1605,9 +1607,11 @@ span#checkpoint_status,span#autosave_status{font-size:small}
|
|||||||
.highlight .s1 { color: #BA2121 } /* Literal.String.Single */
|
.highlight .s1 { color: #BA2121 } /* Literal.String.Single */
|
||||||
.highlight .ss { color: #19177C } /* Literal.String.Symbol */
|
.highlight .ss { color: #19177C } /* Literal.String.Symbol */
|
||||||
.highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */
|
.highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */
|
||||||
|
.highlight .fm { color: #0000FF } /* Name.Function.Magic */
|
||||||
.highlight .vc { color: #19177C } /* Name.Variable.Class */
|
.highlight .vc { color: #19177C } /* Name.Variable.Class */
|
||||||
.highlight .vg { color: #19177C } /* Name.Variable.Global */
|
.highlight .vg { color: #19177C } /* Name.Variable.Global */
|
||||||
.highlight .vi { color: #19177C } /* Name.Variable.Instance */
|
.highlight .vi { color: #19177C } /* Name.Variable.Instance */
|
||||||
|
.highlight .vm { color: #19177C } /* Name.Variable.Magic */
|
||||||
.highlight .il { color: #666666 } /* Literal.Number.Integer.Long */
|
.highlight .il { color: #666666 } /* Literal.Number.Integer.Long */
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
15
docker-compose.yml
Normal file
15
docker-compose.yml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
version: '3'
|
||||||
|
services:
|
||||||
|
blog:
|
||||||
|
build:
|
||||||
|
context: writing_env/
|
||||||
|
container_name: blog
|
||||||
|
environment:
|
||||||
|
- BLOG_UID=1000
|
||||||
|
- BLOG_GID=1000
|
||||||
|
volumes:
|
||||||
|
- $PWD:/blog
|
||||||
|
- $HOME/.ssh:/home/blog/.ssh
|
||||||
|
stdin_open: true
|
||||||
|
tty: true
|
||||||
|
command: /bin/true
|
1
pelican-plugins
Submodule
1
pelican-plugins
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 6dbc6833bcb6e53f4af04e46848c860bf467e77e
|
@ -1,29 +0,0 @@
|
|||||||
FROM alpine:3.5
|
|
||||||
|
|
||||||
ENV SSL_CERT_FILE /etc/ssl/certs/ca-certificates.crt
|
|
||||||
|
|
||||||
RUN apk add --update \
|
|
||||||
bash \
|
|
||||||
openssh \
|
|
||||||
python \
|
|
||||||
sudo \
|
|
||||||
&& rm -rf /var/cache/apk/*
|
|
||||||
|
|
||||||
# create ssh keys
|
|
||||||
RUN ssh-keygen -A
|
|
||||||
|
|
||||||
# add vagrant user
|
|
||||||
RUN adduser -h /home/vagrant -s /bin/sh -D vagrant
|
|
||||||
|
|
||||||
# configure SSH access
|
|
||||||
RUN mkdir -p /home/vagrant/.ssh \
|
|
||||||
&& echo "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzIw+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoPkcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NOTd0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcWyLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQ== vagrant insecure public key" > /home/vagrant/.ssh/authorized_keys \
|
|
||||||
&& chown -R vagrant: /home/vagrant/.ssh \
|
|
||||||
&& echo -n 'vagrant:vagrant' | chpasswd
|
|
||||||
|
|
||||||
# enable passwordless sudo for the "vagrant" user
|
|
||||||
RUN echo 'vagrant ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers.d/vagrant \
|
|
||||||
&& chmod 0440 /etc/sudoers.d/vagrant
|
|
||||||
|
|
||||||
EXPOSE 22
|
|
||||||
CMD ["/usr/sbin/sshd", "-D", "-o", "UseDNS=no", "-o", "UsePAM=no"]
|
|
@ -1,6 +0,0 @@
|
|||||||
[supervisord]
|
|
||||||
nodaemon=true
|
|
||||||
|
|
||||||
[program:sshd]
|
|
||||||
command=/usr/sbin/sshd -D -o UseDNS=no -o UsePAM=no
|
|
||||||
autostart=true
|
|
28
writing_env/Dockerfile
Normal file
28
writing_env/Dockerfile
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
FROM alpine:3.5
|
||||||
|
|
||||||
|
ENV SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt
|
||||||
|
ENV BLOG_UID=1000 BLOG_GID=1000
|
||||||
|
|
||||||
|
ADD root /
|
||||||
|
|
||||||
|
RUN set -ex \
|
||||||
|
&& apk add --no-cache \
|
||||||
|
ansible \
|
||||||
|
bash \
|
||||||
|
g++ \
|
||||||
|
openssh \
|
||||||
|
python \
|
||||||
|
sudo \
|
||||||
|
&& addgroup -g $BLOG_GID blog \
|
||||||
|
&& adduser -h /home/blog -D -s /bin/sh -G blog blog \
|
||||||
|
&& echo 'blog ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers.d/blog \
|
||||||
|
&& chmod 0440 /etc/sudoers.d/blog \
|
||||||
|
&& chown -R $BLOG_UID:$BLOG_GID /home/blog
|
||||||
|
|
||||||
|
USER blog
|
||||||
|
|
||||||
|
RUN set -ex \
|
||||||
|
&& ansible-playbook -c local /home/blog/playbooks/writing_env.yml \
|
||||||
|
&& /bin/zsh -c "source /home/blog/.zshrc && antigen update"
|
||||||
|
|
||||||
|
ENTRYPOINT ["/usr/local/bin/entrypoint"]
|
@ -1,6 +1,6 @@
|
|||||||
# vim:ft=ansible
|
# vim:ft=ansible
|
||||||
---
|
---
|
||||||
- hosts: all
|
- hosts: localhost
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
|
|
||||||
@ -15,7 +15,7 @@
|
|||||||
- ca-certificates
|
- ca-certificates
|
||||||
- coreutils
|
- coreutils
|
||||||
- curl
|
- curl
|
||||||
- g++
|
#- g++
|
||||||
- gcc
|
- gcc
|
||||||
- git
|
- git
|
||||||
- grep
|
- grep
|
||||||
@ -60,12 +60,6 @@
|
|||||||
src=flickr2markdown
|
src=flickr2markdown
|
||||||
dest=~/.flickr2markdown
|
dest=~/.flickr2markdown
|
||||||
|
|
||||||
- name: clone pelican-plugins
|
|
||||||
git:
|
|
||||||
repo=git@github.com:xsteadfastx/pelican-plugins.git
|
|
||||||
dest=/vagrant/pelican-plugins
|
|
||||||
accept_hostkey=yes
|
|
||||||
|
|
||||||
- name: install js packages
|
- name: install js packages
|
||||||
npm:
|
npm:
|
||||||
name={{ item }}
|
name={{ item }}
|
||||||
@ -114,20 +108,3 @@
|
|||||||
|
|
||||||
- name: no git colors
|
- name: no git colors
|
||||||
command: git config --global color.ui false
|
command: git config --global color.ui false
|
||||||
|
|
||||||
- name: remove some deps
|
|
||||||
apk:
|
|
||||||
name={{ item }}
|
|
||||||
state=absent
|
|
||||||
with_items:
|
|
||||||
- gcc
|
|
||||||
- g++
|
|
||||||
- musl-dev
|
|
||||||
- python3-dev
|
|
||||||
become: yes
|
|
||||||
|
|
||||||
- name: remove ansible
|
|
||||||
file:
|
|
||||||
path=~/ansible
|
|
||||||
state=absent
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user