-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.dev
More file actions
46 lines (35 loc) · 1.25 KB
/
Dockerfile.dev
File metadata and controls
46 lines (35 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
FROM ghcr.io/astral-sh/uv:0.10-python3.11-trixie-slim
# Set environment variables
ENV DEBIAN_FRONTEND=noninteractive
ENV CONFIG_DIR=/config
ENV CONFIG_NAME=config.yaml
VOLUME [ "/config" ]
# Install dependencies
RUN apt-get update && apt-get install -y \
postgresql postgresql-contrib \
rsync \
openssh-client \
libpq-dev && \
rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install -y curl unzip && \
curl -fsSL https://releases.hashicorp.com/terraform/1.6.6/terraform_1.6.6_linux_amd64.zip -o /tmp/terraform.zip && \
unzip /tmp/terraform.zip -d /usr/local/bin && \
rm /tmp/terraform.zip
# Set working directory
WORKDIR /app
# Copy PostgreSQL config
COPY pg_hba.conf /etc/postgresql/15/main/pg_hba.conf
# Copy package files
COPY . /app/lablink-allocator
# Install package with dev dependencies using uv sync
# Use UV_PROJECT_ENVIRONMENT to specify venv location (matches production)
WORKDIR /app/lablink-allocator
RUN UV_PROJECT_ENVIRONMENT=/app/.venv uv sync --extra dev
WORKDIR /app
# Expose ports for Flask
EXPOSE 5000
# Copy and set permissions for startup script
COPY start.sh /app/start.sh
RUN chmod +x /app/start.sh
# Set the entrypoint script to start the Flask application
CMD ["/bin/bash", "-c", "/app/start.sh"]