fork
Configure Feed
Select the types of activity you want to include in your feed.
mirror of https://git.lenooby09.tech/LeNooby09/social-app.git
fork
Configure Feed
Select the types of activity you want to include in your feed.
1FROM golang:1.21-bullseye AS build-env
2
3WORKDIR /usr/src/social-app
4
5ENV DEBIAN_FRONTEND=noninteractive
6
7# Node
8ENV NODE_VERSION=18
9ENV NVM_DIR=/usr/share/nvm
10
11# Go
12ENV GODEBUG="netdns=go"
13ENV GOOS="linux"
14ENV GOARCH="amd64"
15ENV CGO_ENABLED=1
16ENV GOEXPERIMENT="loopvar"
17
18COPY . .
19
20#
21# Generate the JavaScript webpack. NOTE: this will change
22#
23RUN mkdir --parents $NVM_DIR && \
24 wget \
25 --output-document=/tmp/nvm-install.sh \
26 https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh && \
27 bash /tmp/nvm-install.sh
28
29RUN \. "$NVM_DIR/nvm.sh" && \
30 nvm install $NODE_VERSION && \
31 nvm use $NODE_VERSION && \
32 npm install --global yarn && \
33 yarn && \
34 cd bskyembed && yarn install --frozen-lockfile && cd .. && \
35 yarn intl:build && \
36 yarn build-embed
37
38# DEBUG
39RUN find ./bskyweb/embedr-static && find ./bskyweb/embedr-templates && find ./bskyembed/dist
40
41# hack around issue with empty directory and go:embed
42RUN touch bskyweb/static/js/empty.txt
43
44#
45# Generate the embedr Go binary.
46#
47RUN cd bskyweb/ && \
48 go mod download && \
49 go mod verify
50
51RUN cd bskyweb/ && \
52 go build \
53 -v \
54 -trimpath \
55 -tags timetzdata \
56 -o /embedr \
57 ./cmd/embedr
58
59FROM debian:bullseye-slim
60
61ENV GODEBUG=netdns=go
62ENV TZ=Etc/UTC
63ENV DEBIAN_FRONTEND=noninteractive
64
65RUN apt-get update && apt-get install --yes \
66 dumb-init \
67 ca-certificates
68
69ENTRYPOINT ["dumb-init", "--"]
70
71WORKDIR /embedr
72COPY --from=build-env /embedr /usr/bin/embedr
73
74CMD ["/usr/bin/embedr"]
75
76LABEL org.opencontainers.image.source=https://github.com/bluesky-social/social-app
77LABEL org.opencontainers.image.description="embed.bsky.app Web App"
78LABEL org.opencontainers.image.licenses=MIT