FROM git.orionkindel.com/tpl/asdf:bookworm-full AS base RUN apt-get update && apt-get install -y wget nginx procps lsb-release tmux RUN wget https://dl.min.io/server/minio/release/linux-amd64/minio -O /usr/bin/minio && chmod +x /usr/bin/minio RUN go install github.com/DarthSim/overmind/v2@latest RUN asdf global python 3.12.3 && asdf plugin remove postgres && pip install setuptools RUN npm i -g yarn && yarn set version 1.22.19 RUN 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 RUN 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 FROM base AS run COPY --from=git.orionkindel.com/thunderstrike/plane-base:latest /app /app COPY --from=git.orionkindel.com/thunderstrike/plane-base:latest /etc /etc COPY --from=git.orionkindel.com/thunderstrike/plane-base:latest /root/.asdf/installs/python /root/.asdf/installs/python WORKDIR /app RUN chmod -R 755 /root \ && chmod -R 755 /root/.asdf \ && chmod -R 755 apiserver \ && chmod -R 755 web \ && chmod -R 755 space \ && chmod -x /root/.asdf/lib/commands/* \ && chmod +x /etc/db-run.sh \ && ln $(asdf which node) /usr/bin/node \ && ln $(asdf which npm) /usr/bin/npm \ && ln $(asdf which python) /usr/bin/python ENTRYPOINT ["bash", "-lc", "/etc/entrypoint.sh"]