mirror of
https://github.com/codeflash-ai/codeflash-internal.git
synced 2026-05-04 18:25:18 +00:00
Signed-off-by: Saurabh Misra <misra.saurabh1@gmail.com> Co-authored-by: saga4 <saga4@codeflashs-MacBook-Air.local> Co-authored-by: Sarthak Agarwal <sarthak.saga@gmail.com> Co-authored-by: Mohamed Ashraf <mohamedashrraf222@gmail.com> Co-authored-by: Aseem Saxena <aseem.bits@gmail.com>
46 lines
No EOL
1.2 KiB
Text
46 lines
No EOL
1.2 KiB
Text
# Unified Codeflash Container - Using Pre-built Images
|
|
FROM node:20-alpine
|
|
|
|
# Install Python, PostgreSQL, and supervisor
|
|
RUN apk add --no-cache \
|
|
python3 \
|
|
py3-pip \
|
|
postgresql15 \
|
|
postgresql15-client \
|
|
supervisor \
|
|
bash \
|
|
openssl \
|
|
&& rm -rf /var/cache/apk/*
|
|
|
|
# Install Python uv
|
|
RUN pip3 install --break-system-packages uv
|
|
|
|
WORKDIR /app
|
|
|
|
# Copy cf-api from pre-built image
|
|
COPY --from=codeflash/cf-api:latest /app /app/cf-api
|
|
COPY --from=codeflash/cf-api:latest /common /common
|
|
|
|
# Copy aiservice from pre-built image
|
|
COPY --from=codeflash/aiservice:latest /app /app/aiservice
|
|
|
|
# Create PostgreSQL data directory with correct permissions
|
|
RUN mkdir -p /var/lib/postgresql/data /var/run/postgresql && \
|
|
chown -R postgres:postgres /var/lib/postgresql /var/run/postgresql
|
|
|
|
# Copy configuration files
|
|
COPY deployment/onprem-simple/supervisord.conf /etc/supervisord.conf
|
|
COPY deployment/onprem-simple/init-db.sh /app/init-db.sh
|
|
COPY deployment/onprem-simple/startup.sh /app/startup.sh
|
|
|
|
RUN chmod +x /app/init-db.sh /app/startup.sh
|
|
|
|
# Expose ports
|
|
EXPOSE 5432 8000 3001
|
|
|
|
# Set environment variables
|
|
ENV PGDATA=/var/lib/postgresql/data
|
|
ENV PATH="/var/lib/postgresql/bin:${PATH}"
|
|
|
|
# Start supervisor
|
|
CMD ["/app/startup.sh"] |