-
Notifications
You must be signed in to change notification settings - Fork 0
/
heroku-Dockerfile
32 lines (23 loc) · 1.03 KB
/
heroku-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
FROM python:3.7.7-stretch
RUN apt-get update && apt-get install -y postgresql-client
# Install Heroku GPG dependencies
RUN apt-get install -y gpg apt-transport-https gpg-agent curl ca-certificates
# Add Datadog repository and signing keys
RUN sh -c "echo 'deb https://apt.datadoghq.com/ stable 7' > /etc/apt/sources.list.d/datadog.list"
RUN apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 A2923DFF56EDA6E76E55E492D3A80E30382E94DE
RUN apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 D75CEA17048B9ACBF186794B32637D44F14F620E
# Install the Datadog agent
RUN apt-get update && apt-get -y --force-yes install --reinstall datadog-agent
# Install app related dependencies
RUN pip install poetry
WORKDIR /app
ENV POETRY_VIRTUALENVS_IN_PROJECT true
COPY . .
RUN poetry install
RUN poetry run pip install gunicorn
# Expose DogStatsD and trace-agent ports
EXPOSE 8125/udp 8126/tcp
# Copy Datadog configuration
COPY heroku/datadog-config/ /etc/datadog-agent/
# Use heroku entrypoint
CMD ["/app/heroku/heroku-entrypoint.sh"]