-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
33 lines (27 loc) · 950 Bytes
/
Dockerfile
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
FROM python:3.13-slim
# renovate: datasource=pypi depName=ansible
ENV ANSIBLE_VERSION=9.11.0
RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends \
git \
git-crypt \
openssh-client \
; \
rm -rf /var/lib/apt/lists/*; \
pip install poetry; \
git config --global user.name "Deployer"; \
git config --global user.email "it-gruppa@foreningenbs.no"; \
# Installing Ansible takes a lot of space.
# Keep it in this layer to prevent it to be invalidated
# for other dependency changes.
pip install ansible==$ANSIBLE_VERSION
WORKDIR /code
COPY poetry.lock pyproject.toml /code/
RUN set -eux; \
poetry config virtualenvs.create false; \
poetry install --no-interaction --no-ansi
COPY deployer /code/deployer
COPY container/ssh_config /root/.ssh/config
EXPOSE 8000
CMD ["gunicorn", "--timeout", "900", "-b", "0.0.0.0:8000", "--threads", "4", "deployer.app:app"]