forked from PostHog/posthog-foss
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.cloud
29 lines (22 loc) · 972 Bytes
/
Dockerfile.cloud
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
#
# Extend the non-Cloud image with anything required for PostHog Cloud (app.posthog.com)
#
ARG BASE_IMAGE
FROM ${BASE_IMAGE}
WORKDIR /code/
USER root
# TLS: add in our own root CAs for the deployment environment, such that we can
# validate certs. See
# https://github.com/PostHog/posthog-cloud-infra/tree/main/pki for details of
# the setup.
COPY ./certs/* /usr/local/share/ca-certificates/
RUN chmod 644 /usr/local/share/ca-certificates/posthog-*.crt && update-ca-certificates
# Add in requirements we don't have in the base image
COPY requirements.txt /code/cloud_requirements.txt
RUN pip install -r cloud_requirements.txt --no-cache-dir
COPY ./multi_tenancy /code/multi_tenancy/
COPY ./messaging /code/messaging/
COPY ./multi_tenancy_settings.py /code/cloud_settings.py
RUN cat /code/cloud_settings.py > /code/posthog/settings/cloud.py
USER posthog
RUN DATABASE_URL='postgres:///' REDIS_URL='redis:///' SECRET_KEY='no' python manage.py collectstatic --noinput