mirror of
https://github.com/PostHog/posthog.git
synced 2024-11-28 09:16:49 +01:00
30 lines
954 B
Docker
30 lines
954 B
Docker
#
|
|
# Extend the non-Cloud image with anything required for PostHog Cloud
|
|
#
|
|
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
|