Bluesky app fork with some witchin' additions 馃挮
witchsky.app
bluesky
fork
1FROM node:20.11-alpine3.18 as build
2
3# Move files into the image and install
4WORKDIR /app
5
6COPY ./bskylink/package.json ./
7COPY ./bskylink/yarn.lock ./
8RUN yarn install --frozen-lockfile
9
10COPY ./bskylink ./
11
12# build then prune dev deps
13RUN yarn build
14RUN yarn install --production --ignore-scripts --prefer-offline
15
16# Uses assets from build stage to reduce build size
17FROM node:20.11-alpine3.18
18
19RUN apk add --update dumb-init
20
21# Avoid zombie processes, handle signal forwarding
22ENTRYPOINT ["dumb-init", "--"]
23
24WORKDIR /app
25COPY --from=build /app /app
26RUN mkdir /app/data && chown node /app/data
27
28VOLUME /app/data
29EXPOSE 3000
30ENV LINK_PORT=3000
31ENV NODE_ENV=production
32# potential perf issues w/ io_uring on this version of node
33ENV UV_USE_IO_URING=0
34
35# https://github.com/nodejs/docker-node/blob/master/docs/BestPractices.md#non-root-user
36USER node
37CMD ["node", "--heapsnapshot-signal=SIGUSR2", "--enable-source-maps", "dist/bin.js"]
38
39LABEL org.opencontainers.image.source=https://github.com/bluesky-social/social-app
40LABEL org.opencontainers.image.description="Bsky Link Service"
41LABEL org.opencontainers.image.licenses=UNLICENSED