-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.record
More file actions
39 lines (30 loc) · 1.01 KB
/
Dockerfile.record
File metadata and controls
39 lines (30 loc) · 1.01 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
# Dockerfile
FROM python:3.12-slim
# Install system dependencies
RUN apt-get update && apt-get install -y \
curl \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Install Poetry
RUN curl -sSL https://install.python-poetry.org | POETRY_HOME=/opt/poetry python && \
ln -s /opt/poetry/bin/poetry /usr/local/bin/poetry && \
poetry config virtualenvs.create false
# Copy poetry files first (for better Docker layer caching)
COPY pyproject.toml poetry.lock* ./
# Copy the rest of the application files
COPY ./cryptotrading ./cryptotrading/
COPY record.sh ./
COPY README.md ./
# Install dependencies after copying all necessary files
ARG INSTALL_DEV=false
RUN if [ "$INSTALL_DEV" = "true" ] ; then \
poetry install ; \
else \
poetry install --only main ; \
fi
# Make script executable and list files for debugging
RUN chmod +x ./record.sh && ls -la
# Expose port
EXPOSE 8300
# Run application
CMD ["poetry", "run", "python", "cryptotrading/rollbit/prices/record.py", ">", "record_output.log"]