make container build work
This commit is contained in:
parent
12f55ad721
commit
1fcb035fce
6 changed files with 15 additions and 9 deletions
3
.envrc
3
.envrc
|
|
@ -1,2 +1,3 @@
|
|||
export TAILSCALESD_ENV_FILE=./.env
|
||||
export TAILSCALESD_ENV_FILE=./dev.env
|
||||
use nix
|
||||
dotenv
|
||||
|
|
|
|||
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -8,4 +8,4 @@ tmp/
|
|||
build
|
||||
htmlcov
|
||||
.direnv/
|
||||
.env
|
||||
*.env
|
||||
|
|
|
|||
3
Makefile
3
Makefile
|
|
@ -3,9 +3,10 @@ SRC := tailscalesd
|
|||
TESTS := tests
|
||||
SHELL := $(shell which bash)
|
||||
APP_VERSION := $(shell git rev-parse --short HEAD)
|
||||
DOCKER ?= docker
|
||||
|
||||
docker-build:
|
||||
DOCKER_BUILDKIT=1 docker build -f docker/Dockerfile \
|
||||
DOCKER_BUILDKIT=1 $(DOCKER) build -f docker/Dockerfile \
|
||||
--build-arg=$(APP_VERSION) \
|
||||
-t tailscalesd:latest \
|
||||
.
|
||||
|
|
|
|||
|
|
@ -25,10 +25,9 @@ USER ${APP}
|
|||
WORKDIR ${APP_BASE}/${APP}
|
||||
COPY --chown=${APP}:${APP} requirements.frozen.txt requirements.frozen.txt
|
||||
RUN pip3 install -r requirements.frozen.txt
|
||||
COPY --chown=${APP}:${APP} gm gm
|
||||
COPY --chown=${APP}:${APP} tailscalesd tailscalesd
|
||||
|
||||
ENTRYPOINT ["/bin/bash", "/entrypoint.sh"]
|
||||
CMD /usr/bin/env python3 -m tailscalesd.main:main
|
||||
USER ${APP}
|
||||
ARG APP_VERSION
|
||||
ENV APP_VERSION="${APP_VERSION}"%
|
||||
ENV APP_VERSION="${APP_VERSION}"
|
||||
|
|
|
|||
5
docker/entrypoint.sh
Normal file
5
docker/entrypoint.sh
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
#!/bin/bash
|
||||
set -e;
|
||||
|
||||
cd /srv/tailscalesd;
|
||||
exec /usr/bin/env python3 -m tailscalesd.main:main "$@"
|
||||
|
|
@ -1,13 +1,13 @@
|
|||
[tool.poetry]
|
||||
name = "tailscalesd"
|
||||
version = "0.1.0"
|
||||
description = ""
|
||||
description = "Discover services to monitor with prometheus over tailscale"
|
||||
authors = ["Abel Luck <abel@guardianproject.info>"]
|
||||
include = ["LICENSE.MD"]
|
||||
exclude = ["tests"]
|
||||
readme = "README.md"
|
||||
homepage = "https://gitlab.com/guardianproject-ops/py-tailscalesd"
|
||||
repository = "https://gitlab.com/guardianproject-ops/py-tailscalesd"
|
||||
homepage = "https://gitlab.com/guardianproject-ops/tailscalesd"
|
||||
repository = "https://gitlab.com/guardianproject-ops/tailscalesd"
|
||||
packages = [
|
||||
{ include = "tailscalesd"}
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue