Skip to content

Commit

Permalink
Fixes git client
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmerfield committed Jan 24, 2025
1 parent f184c66 commit e1d087f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 17 deletions.
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ RUN apk add --no-cache git
# configure git
RUN git config --global user.email "[email protected]"
RUN git config --global user.name "Your Name"
# neccessary for the git client to work in the docker container
# the issue is possibly related to the ownership of the git data
# directory, and the root user running the git client
# todo: work out how to fix this
RUN git config --global --add safe.directory '*'


# Install necessary packages for Puppeteer
RUN apk add --no-cache \
Expand Down
3 changes: 0 additions & 3 deletions app/clients/git/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// Remove this?
require("fs-extra").ensureDirSync(__dirname + "/data");

module.exports = {
display_name: "Git",
description: "An open-source version control system",
Expand Down
12 changes: 2 additions & 10 deletions config/openresty/conf/http.conf
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,13 @@ proxy_cache_path {{{cache_directory}}} levels=1:2 keys_zone=PROXY_CACHE:30m in
lua_shared_dict cacher_dictionary 75m;

upstream blot_node {
# server {{node_ip}}:{{node_port}};
server 127.0.0.1:8088;
server 127.0.0.1:8089;
server 127.0.0.1:8088;
server 127.0.0.1:8089;

# Activates the cache for connections to upstream servers.
keepalive 64;
}

upstream blot_node_containerized {
server 127.0.0.1:8088;

# Activates the cache for connections to upstream servers.
keepalive 64;
}

# we want to detect if the request is from a preview subdomain of blot.im
# preview subdomains are in the format preview-of-$IDENTIFIER.blot.im where $IDENTIFIER is the
# template name and username of the blog, separated by a hyphen, e.g.
Expand Down
10 changes: 6 additions & 4 deletions config/openresty/conf/reverse-proxy.conf
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
add_header 'Blot-Server' '{{server_label}}' always;
add_header 'Blot-Upstream' $upstream_server always;
# add_header 'Blot-Upstream' $upstream_server always;

set $upstream_server blot_node;
# set $upstream_server blot_node;

# if ($remote_addr = '79.35.122.153') {
# set $upstream_server blot_node_containerized;
# }

proxy_pass http://$upstream_server;
proxy_pass http://blot_node;
proxy_http_version 1.1;

proxy_set_header Host $host;
Expand All @@ -25,4 +25,6 @@ gzip_types text/plain text/css application/json application/javascript applicati
gzip_comp_level 9;
gzip_proxied any;

proxy_redirect off;
proxy_redirect off;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
proxy_connect_timeout 5s;

0 comments on commit e1d087f

Please sign in to comment.