forked from piraces/rsslay
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.railwayapp
93 lines (81 loc) · 2.25 KB
/
Dockerfile.railwayapp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
FROM golang:1.21-alpine as build
ARG PORT
ARG DB_DIR
ARG DEFAULT_PROFILE_PICTURE_URL
ARG SECRET
ARG REPLAY_TO_RELAYS
ARG RELAYS_TO_PUBLISH_TO
ARG NITTER_INSTANCES
ARG DEFAULT_WAIT_TIME_BETWEEN_BATCHES
ARG DEFAULT_WAIT_TIME_FOR_RELAY_RESPONSE
ARG MAX_EVENTS_TO_REPLAY
ARG ENABLE_AUTO_NIP05_REGISTRATION
ARG MAIN_DOMAIN_NAME
ARG OWNER_PUBLIC_KEY
ARG MAX_SUBROUTINES
ARG INFO_RELAY_NAME
ARG INFO_CONTACT
ARG MAX_CONTENT_LENGTH
ARG LOG_LEVEL
ARG DELETE_FAILING_FEEDS
WORKDIR /app
COPY go.mod ./
COPY go.sum ./
RUN go mod download
COPY cmd/ ./cmd/
COPY internal/ ./internal/
COPY pkg/ ./pkg/
COPY web/ ./web/
COPY scripts/ ./scripts/
RUN apk add --no-cache build-base
RUN CGO_ENABLED=1 go build -ldflags="-s -w -linkmode external -extldflags '-static'" -o /rsslay cmd/rsslay/main.go
FROM alpine:latest
ARG PORT
ARG DB_DIR
ARG DEFAULT_PROFILE_PICTURE_URL
ARG SECRET
ARG REPLAY_TO_RELAYS
ARG RELAYS_TO_PUBLISH_TO
ARG NITTER_INSTANCES
ARG DEFAULT_WAIT_TIME_BETWEEN_BATCHES
ARG DEFAULT_WAIT_TIME_FOR_RELAY_RESPONSE
ARG MAX_EVENTS_TO_REPLAY
ARG ENABLE_AUTO_NIP05_REGISTRATION
ARG MAIN_DOMAIN_NAME
ARG OWNER_PUBLIC_KEY
ARG MAX_SUBROUTINES
ARG INFO_RELAY_NAME
ARG INFO_CONTACT
ARG MAX_CONTENT_LENGTH
ARG LOG_LEVEL
ARG DELETE_FAILING_FEEDS
ARG REDIS_CONNECTION_STRING
LABEL org.opencontainers.image.title="rsslay"
LABEL org.opencontainers.image.source=https://github.com/piraces/rsslay
LABEL org.opencontainers.image.description="rsslay turns RSS or Atom feeds into Nostr profiles"
LABEL org.opencontainers.image.authors="Raúl Piracés"
LABEL org.opencontainers.image.licenses=MIT
ENV PORT=$PORT
ENV DB_DIR=$DB_DIR
ENV DEFAULT_PROFILE_PICTURE_URL=$DEFAULT_PROFILE_PICTURE_URL
ENV SECRET=$SECRET
ENV VERSION=0.5.4
ENV REPLAY_TO_RELAYS=false
ENV RELAYS_TO_PUBLISH_TO=""
ENV NITTER_INSTANCES=""
ENV DEFAULT_WAIT_TIME_BETWEEN_BATCHES=60000
ENV DEFAULT_WAIT_TIME_FOR_RELAY_RESPONSE=3000
ENV MAX_EVENTS_TO_REPLAY=10
ENV ENABLE_AUTO_NIP05_REGISTRATION="false"
ENV MAIN_DOMAIN_NAME=""
ENV OWNER_PUBLIC_KEY=""
ENV MAX_SUBROUTINES=20
ENV INFO_RELAY_NAME="rsslay"
ENV INFO_CONTACT=""
ENV MAX_CONTENT_LENGTH=250
ENV LOG_LEVEL="WARN"
ENV DELETE_FAILING_FEEDS=false
ENV REDIS_CONNECTION_STRING=$REDIS_CONNECTION_STRING
COPY --from=build /rsslay .
COPY --from=build /app/web/assets/ ./web/assets/
CMD [ "/rsslay" ]