Skip to content

Commit

Permalink
pixi smoke tests good
Browse files Browse the repository at this point in the history
  • Loading branch information
John Dutchover committed Mar 8, 2024
1 parent a7ee5f8 commit cb055ea
Show file tree
Hide file tree
Showing 4 changed files with 525 additions and 498 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -403,3 +403,4 @@ id-cert.pub
# test report
report.md
# End of project exclusions
.pixi/*
27 changes: 17 additions & 10 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,27 +1,34 @@
# syntax=docker/dockerfile:1
FROM python:3.10.13-slim-bookworm
FROM python:3.12-slim-bookworm
WORKDIR /app
ENV PIXI_VERSION=latest
ENV INSTALL_DIR=/usr/local/bin
ENV REPO=prefix-dev/pixi
ENV PLATFORM=unknown-linux-musl
ENV PROJECT_NAME=pixi-in-docker
ENV PYTHONPATH /app

# Install apt-utils first to avoid debconf warning
RUN apt-get update \
&& apt-get install -y --no-install-recommends apt-utils \
&& apt-get install -y --no-install-recommends apt-utils curl tar \
&& apt-get upgrade -y \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# Copy the necessary files from the repository root
COPY .env pyproject.toml poetry.lock /app/
# Download and install pixi
RUN if [ "$PIXI_VERSION" = "latest" ]; then \
DOWNLOAD_URL="https://github.com/$REPO/releases/latest/download/pixi-$(uname -m)-$PLATFORM.tar.gz"; \
else \
DOWNLOAD_URL="https://github.com/$REPO/releases/download/$PIXI_VERSION/pixi-$(uname -m)-$PLATFORM.tar.gz"; \
fi && \
curl -SL "$DOWNLOAD_URL" | tar -xz -C "$INSTALL_DIR"

# Install poetry and project dependencies, upgrade pip first
RUN pip install --upgrade pip \
&& pip install --no-cache-dir poetry \
&& poetry config virtualenvs.create false \
&& poetry install --no-interaction --no-ansi
# Copy the necessary files from the repository root
COPY ../pixi.toml ../pixi.lock ../pyproject.toml backend/.env /app/

# Copy the application-specific files from the backend subdirectory
COPY backend/slackbolt_api.py backend/start_bolt.sh /app/

EXPOSE 3000

ENTRYPOINT ["sh", "/app/start_bolt.sh"]
ENTRYPOINT ["pixi", "run", "-e", "prod", "start-d"]
Loading

0 comments on commit cb055ea

Please sign in to comment.