deployed 0.1
This commit is contained in:
38
deploy/Dockerfile-alpine-backend
Normal file
38
deploy/Dockerfile-alpine-backend
Normal file
@@ -0,0 +1,38 @@
|
||||
FROM python:3.14-alpine
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /app
|
||||
|
||||
# Copy requirements first for better caching
|
||||
COPY backend/requirements.txt /app/requirements.txt
|
||||
|
||||
# Install TA-Lib C library and build dependencies, then install Python dependencies and clean up
|
||||
RUN apk add --no-cache --virtual .build-deps \
|
||||
gcc \
|
||||
g++ \
|
||||
make \
|
||||
musl-dev \
|
||||
wget \
|
||||
tar \
|
||||
cargo \
|
||||
rust \
|
||||
&& wget http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz \
|
||||
&& tar -xzf ta-lib-0.4.0-src.tar.gz \
|
||||
&& cd ta-lib/ \
|
||||
&& ./configure --prefix=/usr \
|
||||
&& make \
|
||||
&& make install \
|
||||
&& cd .. \
|
||||
&& rm -rf ta-lib ta-lib-0.4.0-src.tar.gz \
|
||||
&& pip install --no-cache-dir -r requirements.txt \
|
||||
&& apk del .build-deps \
|
||||
&& rm -rf /var/cache/apk/* /root/.cache /root/.cargo /root/.rustup
|
||||
|
||||
# Copy application code
|
||||
COPY backend/src /app/src
|
||||
|
||||
# Expose port
|
||||
EXPOSE 8000
|
||||
|
||||
# Run the application
|
||||
CMD ["python", "-m", "uvicorn", "src.main:app", "--host", "0.0.0.0", "--port", "8000"]
|
||||
Reference in New Issue
Block a user