-
Notifications
You must be signed in to change notification settings - Fork 39
Expand file tree
/
Copy pathDockerfile
More file actions
26 lines (20 loc) · 759 Bytes
/
Dockerfile
File metadata and controls
26 lines (20 loc) · 759 Bytes
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
# Use the official lightweight Python image.
# https://hub.docker.com/_/python
FROM python:3.10-slim
ENV SCAD_BINARY=openscad DEBUG=False
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y git gcc openscad curl
RUN pip install poetry
# Copy local code to the container image.
ENV APP_HOME /app
WORKDIR $APP_HOME
COPY . .
# Install production dependencies.
RUN poetry config virtualenvs.create false && \
poetry install -v --no-interaction --no-ansi
# Run the web service on container startup. Here we use the gunicorn
# webserver, with one worker process and 8 threads.
# For environments with multiple CPU cores, increase the number of workers
# to be equal to the cores available.
CMD poetry run task service --bind :$PORT