Skip to content

Commit

Permalink
Merge pull request #54 from FREVA-CLINT/new-vault
Browse files Browse the repository at this point in the history
New vault
  • Loading branch information
antarcticrainforest authored Feb 14, 2024
2 parents 85e29ca + e54e860 commit 7ed438c
Show file tree
Hide file tree
Showing 6 changed files with 251 additions and 157 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
-e GID=$(id -g {{ansible_user}})
--name "{{project_name}}-httpd"
--security-opt label=disable
-e FREVA_HOST={{web_server_name}} -p 80:80 -p 443:443
-e FREVA_HOST="{{web_server_name}}" -p 80:80 -p 443:443
httpd:latest /usr/local/bin/prepare-httpd
redis_name: "{{ project_name }}-redis"
apache_name: "{{project_name}}-httpd"
Expand Down
10 changes: 6 additions & 4 deletions assets/share/freva/deployment/vault/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,21 @@ LABEL maintainer="DRKZ-CLINT"
LABEL repository="https://github.com/FREVA-CLINT/freva.git"

ENV VAULT_ADDR='http://127.0.0.1:8200'
COPY runserver.py /bin/runserver
COPY runserver.py /bin/runserver.py
COPY --chown=vault:vault vault-server-tls.hcl /vault
COPY --chown=vault:vault policy-file.hcl /vault
RUN set -ex &&\
chmod +x /bin/runserver &&\
chmod +x /bin/runserver.py &&\
mkdir -p /data && chown -R vault:vault /data &&\
apk add --update --no-cache python3 mysql mysql-client &&\
ln -sf python3 /usr/bin/python

RUN python3 -m ensurepip
RUN pip3 install --no-cache --upgrade pip setuptools &&\
pip3 install requests flask flask_restful
pip3 install requests pyopenssl fastapi uvicorn

EXPOSE 5002
VOLUME /vault/file
CMD ["/bin/runserver"]
CMD /bin/runserver.py &&\
uvicorn --workers 2 --app-dir /bin runserver:app \
--host 0.0.0.0 --port 5002
9 changes: 9 additions & 0 deletions assets/share/freva/deployment/vault/mypy.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[mypy]
strict = True
install_types = True
non_interactive = True
disallow_untyped_defs = True
disallow_incomplete_defs = True
check_untyped_defs = True
disallow_untyped_decorators = True
warn_redundant_casts = True
2 changes: 1 addition & 1 deletion assets/share/freva/deployment/vault/policy-file.hcl
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
path "kv/*" {
capabilities = ["read", "list"]
capabilities = ["read", "list", "delete", "create", "update"]
}
Loading

0 comments on commit 7ed438c

Please sign in to comment.