Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug-1878000: reduce spam from make run #968

Merged
merged 5 commits into from
Feb 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 6 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,8 @@ my.env:

.PHONY: build
build: my.env ## | Build docker images.
${DC} build ${DOCKER_BUILD_OPTS} --build-arg userid=${ANTENNA_UID} --build-arg groupid=${ANTENNA_GID} --progress plain deploy-base
${DC} build --progress plain fakesentry
${DC} build --progress plain localstack statsd
${DC} --progress plain build ${DOCKER_BUILD_OPTS} --build-arg userid=${ANTENNA_UID} --build-arg groupid=${ANTENNA_GID} deploy-base
${DC} --progress plain build fakesentry localstack statsd
touch .docker-build

.PHONY: setup
Expand All @@ -63,7 +62,10 @@ setup: my.env .docker-build ## | Set up services.

.PHONY: run
run: my.env .docker-build ## | Run the webapp and services.
${DC} up web fakesentry
${DC} up \
--attach web \
--attach fakesentry \
web fakesentry

.PHONY: devcontainerbuild
devcontainerbuild: .env ## | Build VS Code development container.
Expand Down
3 changes: 1 addition & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,7 @@ services:
# https://github.com/willkg/kent
fakesentry:
build:
context: .
dockerfile: ./docker/Dockerfile.fakesentry
context: docker/images/fakesentry
image: local/antenna_fakesentry
ports:
- "8090:8090"
Expand Down
23 changes: 0 additions & 23 deletions docker/Dockerfile.fakesentry

This file was deleted.

22 changes: 22 additions & 0 deletions docker/images/fakesentry/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM python:3.10.9-slim@sha256:6862d8ed663a47f649ba5aababed01e44741a032e80d5800db619f5113f65434

WORKDIR /app/

RUN groupadd -r kent && useradd --no-log-init -r -g kent kent

RUN apt-get update && \
apt-get install -y --no-install-recommends curl tini && \
apt-get autoremove -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1

RUN pip install -U 'pip>=20' && \
pip install --no-cache-dir 'kent==1.2.0'

USER kent

ENTRYPOINT ["tini", "--", "/usr/local/bin/kent-server"]
CMD ["run"]