misskey/Dockerfile

31 lines
1.2 KiB
Docker
Raw Permalink Normal View History

2023-05-13 15:46:14 -06:00
FROM docker.io/debian:bookworm
ENV PG_VERSION=15
2023-10-08 15:16:57 -06:00
ENV NODE_MAJOR=20
2023-05-13 15:46:14 -06:00
ENV PG_BIN=/usr/lib/postgresql/$PG_VERSION/bin
ENV PG_DIR=/var/lib/postgresql/$PG_VERSION/main
2023-05-13 16:10:15 -06:00
RUN apt update;apt install -y bash curl openssl postgresql postgresql-contrib ffmpeg git python3 build-essential nginx redis unzip wget procps
2023-10-06 20:37:31 -06:00
RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
2023-09-24 22:41:44 -06:00
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
2023-10-06 20:37:31 -06:00
RUN apt-get update;apt-get install nodejs -y
2023-05-13 15:46:14 -06:00
WORKDIR /opt
2023-05-13 16:10:15 -06:00
RUN git clone -b master https://github.com/misskey-dev/misskey.git --depth=1
2023-09-24 22:41:44 -06:00
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
2023-05-13 15:46:14 -06:00
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/
2023-05-13 16:01:36 -06:00
COPY pg_hba.conf /etc/
2023-05-13 15:46:14 -06:00
COPY crontab /
RUN crontab /crontab
CMD bash /opt/start.sh