Skip to content

Commit

Permalink
Merge pull request #20 from krysopath/dockerhub-hook
Browse files Browse the repository at this point in the history
prolly fix tests in docker this time
  • Loading branch information
krysopath authored Apr 20, 2019
2 parents 318506c + da1c42a commit b011a36
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 19 deletions.
19 changes: 7 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,36 +1,31 @@
ARG BASE_IMAGE

FROM python:$BASE_IMAGE as developement
FROM python:$BASE_IMAGE as dev
WORKDIR /code
ENV HOME=/code
COPY requirements.txt .
RUN mkdir secrets assets\
&& apk add --no-cache \
&& apk add --no-cache\
gnupg\
openssl\
make\
&& pip3 install -r requirements.txt\
&& adduser -D vaultify\
&& chown vaultify .
&& pip3 install -r requirements.txt
COPY ./Makefile Makefile
COPY ./vaultify vaultify
COPY .vaultify.yml ./vaultify.yml
COPY .vaultify.yml .vaultify.yml
COPY ./entry.py entry.py
COPY ./setup.py setup.py
COPY ./tests tests
COPY ./runtests.py runtests.py
RUN make run/tests
RUN make artifact/pkg
USER vaultify
ENTRYPOINT ["python3"]
CMD ["/code/entry.py", "{*}"]
ENTRYPOINT ["/bin/ash"]

FROM python:$BASE_IMAGE as production
FROM python:$BASE_IMAGE as prod
WORKDIR /code
COPY --from=0 /code/dist/vaultify*.whl /code/
COPY --from=0 /code/requirements.txt .
RUN mkdir secrets assets\
&& apk add --no-cache \
&& apk add --no-cache\
gnupg\
openssl\
&& pip3 install -r requirements.txt\
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
TARGET := production
TARGET ?= prod
BASE_IMAGE := 3.7-alpine3.7
HEAD ?= $(shell git rev-parse --short HEAD)
TAG ?= $(shell git describe --abbrev=0 --tags)
Expand Down
5 changes: 0 additions & 5 deletions assets/secrets.plain

This file was deleted.

2 changes: 1 addition & 1 deletion vaultify/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
MODULE_BASE_DIR = os.path.dirname(
os.path.realpath(__file__))
ETC_DEFAULT_CONFIG = '/etc/default/vaultify.yml'
USER_CONFIG = '{}/.vaultify.yml'.format(os.environ.get("HOME", '.'))
USER_CONFIG = '{}/.vaultify.yml'.format(os.environ.get("HOME"))
LOCAL_CONFIG = '{}/.vaultify.yml'.format(os.environ.get("PWD", '.'))

CFG_DEFAULT_FILES = [
Expand Down

0 comments on commit b011a36

Please sign in to comment.