forked from github/plane
78 lines
2.7 KiB
Docker
78 lines
2.7 KiB
Docker
FROM debian:bookworm
|
|
|
|
RUN --mount=type=cache,target=/var/cache/apt \
|
|
apt-get update && apt-get install -y wget nginx procps lsb-release tmux python3 python3-pip nodejs npm curl
|
|
|
|
RUN wget https://dl.min.io/server/minio/release/linux-amd64/archive/minio_20240629012047.0.0_amd64.deb -O minio.deb
|
|
RUN apt-get install -y -f ./minio.deb
|
|
|
|
RUN wget https://go.dev/dl/go1.22.4.linux-amd64.tar.gz
|
|
RUN tar -C /usr/local -xzf go1.22.4.linux-amd64.tar.gz
|
|
|
|
ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/go/bin:/root/go/bin
|
|
RUN go install github.com/DarthSim/overmind/v2@latest
|
|
|
|
RUN npm i -g yarn && yarn set version 1.22.19
|
|
|
|
SHELL ["/bin/bash", "-c"]
|
|
|
|
RUN --mount=type=cache,target=/root/.cache/yarn \
|
|
--mount=type=cache,target=/var/cache/apt \
|
|
sh -c 'echo "deb https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' \
|
|
&& wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \
|
|
&& apt-get update \
|
|
&& apt-get -y install postgresql libpq-dev
|
|
|
|
RUN --mount=type=cache,target=/root/.cache/yarn \
|
|
--mount=type=cache,target=/var/cache/apt \
|
|
set -eo pipefail; \
|
|
curl -fsSL https://packages.redis.io/gpg | gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg; \
|
|
echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb bookworm main" | tee /etc/apt/sources.list.d/redis.list; \
|
|
apt-get update; \
|
|
apt-get install -y redis
|
|
|
|
RUN apt-get install --reinstall python3 python3-pip
|
|
|
|
RUN mkdir /app
|
|
WORKDIR /app
|
|
|
|
COPY package.json turbo.json yarn.lock app.json .
|
|
COPY packages packages
|
|
COPY web web
|
|
COPY space space
|
|
|
|
RUN --mount=type=cache,target=/root/.cache/yarn \
|
|
yarn install --frozen-lockfile \
|
|
&& yarn build \
|
|
&& rm -rf node_modules
|
|
|
|
RUN mkdir -p web/.next/standalone/web/.next \
|
|
&& mv web/public web/.next/standalone/web/public \
|
|
&& mv web/.next/static web/.next/standalone/web/.next/static \
|
|
&& mkdir -p space/.next/standalone/_next \
|
|
&& mv space/public space/.next/standalone/space/public \
|
|
&& mv space/.next/static space/.next/standalone/space/.next/static
|
|
|
|
ENV PYTHONDONTWRITEBYTECODE=1
|
|
ENV PYTHONUNBUFFERED=1
|
|
ENV PIP_DISABLE_PIP_VERSION_CHECK=1
|
|
|
|
COPY apiserver apiserver
|
|
|
|
RUN --mount=type=cache,target=/root/.cache/pip \
|
|
cd apiserver \
|
|
&& pip install --break-system-packages -r requirements.txt --compile \
|
|
&& pip install --break-system-packages -r requirements/local.txt --compile
|
|
|
|
COPY docker/etc/ /etc/
|
|
|
|
RUN chmod -R 755 /root \
|
|
&& chmod -R 755 apiserver \
|
|
&& chmod -R 755 web \
|
|
&& chmod -R 755 space \
|
|
&& chmod +x /etc/db-run.sh
|
|
|
|
RUN apt-get install -y python-is-python3 python3-setuptools
|
|
|
|
ENTRYPOINT ["bash", "/etc/entrypoint.sh"]
|