-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
331a312
commit 7e59bef
Showing
1 changed file
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Start with a base image | ||
FROM python:3.9-slim | ||
|
||
# Set environment variables (if needed) | ||
ENV POLL_INTERVAL=300 | ||
ENV CPU_UPPER_THRESHOLD=80 | ||
ENV CPU_LOWER_THRESHOLD=20 | ||
|
||
# Create a directory for the app | ||
WORKDIR /app | ||
|
||
# Copy the application files to the container | ||
COPY lxc_autoscale /app/ | ||
|
||
# Install Python dependencies | ||
RUN pip install --no-cache-dir -r /app/requirements.txt | ||
|
||
# Set up SSH (if needed) | ||
RUN apt-get update && apt-get install -y openssh-client && rm -rf /var/lib/apt/lists/* | ||
|
||
# Set the entry point to run your application | ||
ENTRYPOINT ["python", "/app/lxc_autoscale.py"] |