31 lines
1.2 KiB
Docker
Executable File
31 lines
1.2 KiB
Docker
Executable File
FROM docker.io/debian:bookworm
|
|
ENV PG_VERSION=15
|
|
ENV NODE_MAJOR=20
|
|
ENV PG_BIN=/usr/lib/postgresql/$PG_VERSION/bin
|
|
ENV PG_DIR=/var/lib/postgresql/$PG_VERSION/main
|
|
RUN apt update;apt install -y bash curl openssl postgresql postgresql-contrib ffmpeg git python3 build-essential nginx redis unzip wget procps
|
|
RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
|
|
RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
|
|
RUN apt-get update;apt-get install nodejs -y
|
|
WORKDIR /opt
|
|
RUN git clone -b master https://github.com/misskey-dev/misskey.git --depth=1
|
|
WORKDIR /opt/misskey
|
|
RUN npm install -g pnpm vite
|
|
RUN git submodule update --init
|
|
RUN pnpm install --frozen-lockfile
|
|
RUN NODE_ENV=production pnpm run build
|
|
|
|
RUN rm -rf /etc/nginx/conf.d/*
|
|
RUN rm -f /etc/nginx/sites-enabled/default
|
|
RUN rm -f /etc/nginx/sites-available/default
|
|
COPY start.sh /opt
|
|
COPY setup.sh /opt
|
|
COPY example.yml /opt/misskey/.config/default.yml
|
|
COPY misskey.conf /etc/nginx/sites-enabled/
|
|
COPY nginx.conf /etc/nginx/
|
|
COPY postgresql.conf /etc/
|
|
COPY pg_hba.conf /etc/
|
|
COPY crontab /
|
|
RUN crontab /crontab
|
|
CMD bash /opt/start.sh
|