forked from Rob--W/cors-anywhere
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
28 lines (20 loc) · 825 Bytes
/
Dockerfile
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
FROM alpine:latest
WORKDIR "/app"
COPY [".", "."]
RUN addgroup nodejs \
&& adduser --disabled-password -g "NodeJS" -G nodejs nodejs \
&& apk add npm \
&& npm install
# For the time being, allow proxied requests without a special HTTP Header
# by commenting out the `requireHeader` line. This can be removed when
# FullCalendar supports custom headers in eventSources. See:
# https://github.com/fullcalendar/fullcalendar/issues/4627#issuecomment-831402797
RUN sed -e "s/requireHeader:.*/requireHeader: ['CF-RAY'],/" \
-e '/httpProxyOptions: {/a \
secure: false,' server.js > server-cloudflare.js
USER nodejs
EXPOSE 8080
HEALTHCHECK --interval=60s --timeout=10s --start-period=60s \
CMD ["wget", "--spider", "http://localhost:8080/"]
ENTRYPOINT ["node"]
CMD ["server-cloudflare.js"]