This commit is contained in:
Spencer Heywood 2022-04-12 10:33:32 -06:00
parent 50af5fe2c9
commit cf9d78eef6
2 changed files with 7 additions and 4 deletions

View file

@ -15,12 +15,12 @@ RUN cd /opt/warpgate \
&& just yarn \
&& just openapi \
&& just yarn build \
&& cargo build
&& cargo build --release
FROM debian:bullseye
LABEL maintainer=heywoodlh
COPY --from=build /opt/warpgate/target/debug/warpgate /usr/local/bin/warpgate
COPY --from=build /opt/warpgate/target/release/warpgate /usr/local/bin/warpgate
COPY docker/run.sh /run.sh
ENV DEBIAN_FRONTEND noninteractive

View file

@ -7,7 +7,8 @@
password_hash=$(echo -n "${ADMIN_PASS}" | warpgate hash | cat)
cat << EOF > /etc/warpgate.yaml
[[ -f '/data/warpgate.yaml' ]] || cat << EOF > /data/warpgate.yaml
---
targets:
- name: web-admin
@ -39,4 +40,6 @@ ssh:
retention: 7days
EOF
warpgate -c /etc/warpgate.yaml $@
[[ -L /etc/warpgate.yaml ]] || ln -s /data/warpgate.yaml /etc/warpgate.yaml
warpgate $@