sforkowany z mirror/soapbox
Docker: open fallback backend at :4444
rodzic
06afd12213
commit
8403615eb0
|
@ -10,7 +10,8 @@ RUN yarn build
|
||||||
FROM nginx:stable-alpine
|
FROM nginx:stable-alpine
|
||||||
EXPOSE 5000
|
EXPOSE 5000
|
||||||
ENV PORT=5000
|
ENV PORT=5000
|
||||||
ENV BACKEND_URL=http://localhost
|
ENV FALLBACK_PORT=4444
|
||||||
|
ENV BACKEND_URL=http://localhost:4444
|
||||||
ENV CSP=
|
ENV CSP=
|
||||||
COPY installation/docker.conf.template /etc/nginx/templates/default.conf.template
|
COPY installation/docker.conf.template /etc/nginx/templates/default.conf.template
|
||||||
COPY --from=build /app/static /usr/share/nginx/html
|
COPY --from=build /app/static /usr/share/nginx/html
|
||||||
|
|
|
@ -18,8 +18,10 @@ map $http_accept $activitypub_location {
|
||||||
|
|
||||||
proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=CACHE:10m inactive=7d max_size=1g;
|
proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=CACHE:10m inactive=7d max_size=1g;
|
||||||
|
|
||||||
|
# Fake backend for when BACKEND_URL isn't defined.
|
||||||
server {
|
server {
|
||||||
server_name localhost;
|
listen ${FALLBACK_PORT};
|
||||||
|
listen [::]:${FALLBACK_PORT};
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
add_header Content-Type "application/json" always;
|
add_header Content-Type "application/json" always;
|
||||||
|
|
Ładowanie…
Reference in New Issue