Skip to content

Commit

Permalink
hotfix: target dockerfile stage
Browse files Browse the repository at this point in the history
  • Loading branch information
tristiisch committed Aug 26, 2024
1 parent 212437a commit 38be292
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ jobs:
uses: docker/build-push-action@v6
with:
context: .
target: executable
platforms: ${{ matrix.platform }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,12 @@ RUN mkdir -p ./src/pyramid.egg-info && \
chmod 770 -R ./src/pyramid.egg-info && \
chown $APP_USER:$APP_GROUP -R ./src/pyramid.egg-info

# Switch to the non-root user
USER $APP_USER

# Install the project
RUN pip install -e .

# Switch to the non-root user
USER $APP_USER

HEALTHCHECK --interval=30s --retries=3 --timeout=30s CMD python ./src/cli.py health

# Expose port for health check
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ DOCKER_CONTEXT_PREPROD := cookie-pulsheberg

.PHONY: logs

all: up-f logs
all: up-b logs

start:
@docker compose up -d --remove-orphans
Expand Down
3 changes: 2 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
services:
discord:
build:
dockerfile: ./Dockerfile
target: executable
context: .
dockerfile: Dockerfile
restart: always
volumes:
- ./logs:/app/logs
Expand Down

0 comments on commit 38be292

Please sign in to comment.